public function boot() { $this->registerPolicies(); $permissions = Permission::all(); foreach ($permissions as $permission){ Gate::define($permission->name,function($admin) use($permission){ return $admin->hasPermission($permission); }); } }
pardon110