实现思想 注册 位置: app/Providers/AuthServiceProvider.php $permissions = \App\AdminPermission::all(); foreach ($permissions as $permission){ Gate::define($permission-name,function ($user) use($permission){ return $user-hasPermissi
实现思想
注册
位置: app/Providers/AuthServiceProvider.php
$permissions = \App\AdminPermission::all();foreach ($permissions as $permission){
Gate::define($permission->name,function ($user) use($permission){
return $user->hasPermission($permission);
});
}
路由
Route::group(['middleware'=>'can:systems'],function(){});页面模版
【本文由:防ddos攻击 http://www.558idc.com/gfcdn.html提供,感恩】