Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我尝试在我的项目中使用 Lumen,但我有两个问题,首先当我尝试return redirect()->back();从我的控制器操作方法中进行操作时,我将状态代码 500 返回到页面。日志文件中没有任何内容,并且我在页面上看不到任何错误消息(我在 bootstrap/app.php 文件和我的 .env 文件中取消注释点文件和外观,我将环境设置为本地并调试为 true) .
return redirect()->back();
当我取消注释 bootstrap/app.php 文件中的一些中间件时,我遇到了同样的问题。
有什么问题?
我认为 redirect()->back() 需要会话才能工作,所以我首先必须在 bootstrap/app.php 文件中启用中间件,但只有在我将 SESSION_DRIVE 添加到 .env 文件时它才会起作用(点文件也必须是在 app.php 文件中启用)。