且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Laravel 5.0自定义404不使用中间件

更新时间:2023-02-24 21:18:52

错误页面无法通过route.php.

The error pages don't go through the routes.php.

Kernel.php中,将中间件从$routeMiddleware阵列移动到$middleware阵列.

In Kernel.php move your middleware from the $routeMiddleware array to $middleware array.

此数组中的中间件将在每个请求上运行(已在5.1中进行测试).

Middleware in this array will run on every request (tested in 5.1).