public function boot()
{
$this->registerPolicies();
//
$permissions = \App\AdminPermission::with('roles')->get();
foreach ($permissions as $permission) {
Gate::define($permission->name, function($user) use($permission) {
return $user->hasPermission($permission);
});
}
}
- 2 回答
- 0 关注
- 1049 浏览
添加回答
举报
0/150
提交
取消