public?function?boot()
{
????$this->registerPolicies();
????$permissions?=?Permission::all();
????foreach?($permissions?as?$permission){
????????Gate::define($permission->name,function($admin)?use($permission){
????????????return?$admin->hasPermission($permission);
????????});
????}
}
- 1 回答
- 0 關(guān)注
- 998 瀏覽
添加回答
舉報(bào)
0/150
提交
取消