标签:中间 efi http 项目目录 mes out make mina func
中间件使用 1、项目目录下cmd中php artisan make:middleware adminLogin,创建中间件 2、注册中间件(\Http\kernel.php) protected $routeMiddleware = [ ‘throttle‘ => \Illuminate\Routing\Middleware\ThrottleRequests::class, ‘adminLogin‘ => \App\Http\Middleware\AdminLogin::class, ]; 3、在group组中加入中间件过滤路由 Route::group([‘namespace‘=>‘admin‘,‘prefix‘=>‘admin‘,‘middleware‘=>‘adminLogin‘],function(){ } 4、打开中间件即可编辑方法(\app\Http\Middleware\adminLogin.php)
标签:中间 efi http 项目目录 mes out make mina func
原文地址:https://www.cnblogs.com/somethingWithiOS/p/10573574.html