doujiao3016 2016-04-02 18:48
浏览 100
已采纳

Laravel 5.2中的ErrorBag始终为空

I was creating a new Laravel project and when debugging the errors of a form request, I noticed that my ErrorBag was always empty. Even when in the controller $validator->fails() returned true. I tried every solution I found on the internet but nothing worked.

Even when creating a fresh project with composer (as described here) my out of the box auth system has an empty error bag when leaving all the field empty.

And yes, all the routes are using the middleware group web.

Any ideas what is causing this problem? (Session::put() and Session::get() are working)

  • 写回答

3条回答 默认 最新

  • dtjpz48440 2016-04-02 21:55
    关注

    As of v5.2.27, released on 2015-03-25, all routes in app\Httpoutes.php are now in the web middleware group by default. If you have explicitly specified this middleware group inside your app\Httpoutes.php file, you should remove it and that should resolve your issue.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
  • ¥500 52810做蓝牙接受端
  • ¥15 基于PLC的三轴机械手程序
  • ¥15 多址通信方式的抗噪声性能和系统容量对比
  • ¥15 winform的chart曲线生成时有凸起
  • ¥15 msix packaging tool打包问题
  • ¥15 finalshell节点的搭建代码和那个端口代码教程
  • ¥15 Centos / PETSc / PETGEM
  • ¥15 centos7.9 IPv6端口telnet和端口监控问题
  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作