douketangyouzh5219 2013-06-29 21:54
浏览 29

Laravel 4 with Sentry - 多步表/注册

I have a process where during the user registration I have to pull data from a 3rd party API service. I'm using Laravel and I'm still at learning stage but I want to do this professionally.

I cant find any plugins related to Laravel 4 or Sentry to accomplish this. One idea that I had is using an array as a Controller property and then have 3 stepOne, stepTwo and stepThree functions that handle 3 different view and each time I simply add the inputed data to array. However even with a static array data is erased as class is reloaded.

Second idea off-course is using a temporary session (browser) to store data. I figured that using Database would expose the data to possible leaks if not done properly on the other hand I feel that using simple session is "unprofessional".

What would be the best way to approach this problem ?

  • 写回答

1条回答 默认 最新

  • dongxian6285 2013-06-30 01:45
    关注

    I think you might misunderstand what a session is, typically a session is stored server side with a cookie which links the browser session to the session data stored on the server. There isn't too much of a security concern for handling a multi-step form in this manner.

    The other option which you might want to consider is simply storing the data right away within the various tables you are using, and somehow flag it as incomplete. More than likely whoever is beginning to fill out the form will complete it, and if they don't you can just have a cron job that runs a script to clear out the incomplete user registrations that are more then say a day old.

    The other thing you might want to consider is not having a multi-step registration. This is typically bad UX. You might instead consider prompting the user to pull in the 3rd party API data post registration.

    评论

报告相同问题?

悬赏问题

  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?
  • ¥15 matlab(相关搜索:紧聚焦)
  • ¥15 基于51单片机的厨房煤气泄露检测报警系统设计
  • ¥15 路易威登官网 里边的参数逆向
  • ¥15 Arduino无法同时连接多个hx711模块,如何解决?
  • ¥50 需求一个up主付费课程
  • ¥20 模型在y分布之外的数据上预测能力不好如何解决
  • ¥15 processing提取音乐节奏