多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
``` // 登录路由命名为login,无权限访问,框架有重定向功能 Route::get('/login-page', '\App\Admin\Controllers\LoginController@index')->name('login'); ``` 路由验证 ``` Route::group(['middleware' => 'auth:admin'], function(){ Route::get('/dashboard', '\App\Admin\Controllers\IndexController@index'); }); ``` config/auth.php ``` 'guards' => [ 'admin' => [ 'driver' => 'session', 'provider' => 'admins', ], ], 'providers' => [ 'admins' => [ 'driver' => 'eloquent', 'model' => App\Models\BUser::class, ], ], ``` 创建中间件,指定路由登录后才有权限访问