类admin不存在?路线::小组问题

时间:2018-10-22 01:30:48

标签: php laravel

将'middleware'=> ['auth','admin']添加到

时发现了此问题
Route::group(['prefix' => 'admin', 'middleware'=> ['auth' => 'admin']], 

它显示出“ Class admin不存在”

protected $routeMiddleware = [
    'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
    'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
    'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
    'can' => \Illuminate\Auth\Middleware\Authorize::class,
    'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
    'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
];

0 个答案:

没有答案