【问题标题】:Laravel cookies with redirect带有重定向的 Laravel cookie
【发布时间】:2015-12-28 03:49:34
【问题描述】:

我的本​​地主机上有 Laravel cookie,但在 Laravel Forge 上没有。在 Forge 上,我收到一个 Nginx 502 bad gateway 错误,我无法分析该错误,因为 Forge 无法访问错误日志。有人可以帮忙吗?

这是我的代码:

 \Cookie::queue('linkedin_user', $li_user); //commenting out this line allows for the proper redirect on Forge
 return redirect('/signup'); 

【问题讨论】:

    标签: php laravel cookies nginx laravel-forge


    【解决方案1】:

    我无法让 cookie 工作,所以我最终改用 Session。轻松交换,没有麻烦。

    \Session::put('linkedin_user', $li_user);
    return redirect('/signup');
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-10-21
      • 1970-01-01
      • 2016-08-27
      • 2015-11-06
      • 2016-01-25
      • 2016-01-09
      相关资源
      最近更新 更多