public function boot()
{
$this->registerPolicies();
$permissions = Permission::all();
foreach ($permissions as $permission){
Gate::define($permission->name,function($admin) use($permission){
return $admin->hasPermission($permission);
});
}
}
添加回答
举报
0/150
提交
取消