1 | <?php |
||
19 | class Permission extends Model |
||
20 | { |
||
21 | use HasRole, RefreshCache; |
||
22 | |||
23 | /** @var string */ |
||
24 | protected $table = 'permissions'; |
||
25 | |||
26 | /** @var array */ |
||
27 | protected $fillable = ['name', 'slug', 'resource', 'system']; |
||
28 | |||
29 | /** @var array */ |
||
30 | protected $casts = ['system' => 'bool']; |
||
31 | |||
32 | /** |
||
33 | * Find a permission by slug. |
||
34 | * |
||
35 | * @param string $slug |
||
36 | * @return \Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Eloquent\Model |
||
37 | */ |
||
38 | public static function findBySlug(string $slug) |
||
42 | |||
43 | /** |
||
44 | * Create a permissions for a resource. |
||
45 | * |
||
46 | * @param string $resource |
||
47 | * @param bool $system |
||
48 | * @return \Illuminate\Support\Collection |
||
49 | */ |
||
50 | public static function createResource(string $resource, $system = false) |
||
98 | |||
99 | /** |
||
100 | * Permission can belong to many users. |
||
101 | * |
||
102 | * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany |
||
103 | */ |
||
104 | public function users(): BelongsToMany |
||
109 | } |
||
110 |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.