26 if (self::$permissions == null) {
27 self::$permissions = Voyager::model('Permission')->all();
28 }
52 // If permission doesn't exist, we can't check it!
53 if (!self::$permissions->contains('key', $action.'_'.$slug)) {
54 return true;
55 }
56
57 return $user->hasPermission($action.'_'.$slug);
{{tag>日記 Laravel Voyager}}