1 | <?php |
||
8 | trait HasPermission |
||
9 | { |
||
10 | use InteractsWithPermission; |
||
11 | |||
12 | /** |
||
13 | * Checks if the role has the given permission. |
||
14 | * |
||
15 | * @param array|string $permission |
||
16 | * @return bool |
||
17 | */ |
||
18 | public function can($permission): bool |
||
32 | |||
33 | /** |
||
34 | * Checks if the role does not have the given permission. |
||
35 | * |
||
36 | * @param array|string $permission |
||
37 | * @return bool |
||
38 | */ |
||
39 | public function cannot($permission): bool |
||
43 | |||
44 | /** |
||
45 | * Check if the role has at least one of the given permissions. |
||
46 | * |
||
47 | * @param string|array $permission |
||
48 | * @return bool |
||
49 | */ |
||
50 | public function canAtLeast($permission): bool |
||
59 | } |
||
60 |