| 1 | <?php namespace Arcanesoft\Auth\Models; |
||
| 11 | class Permission extends BasePermissionModel |
||
| 12 | { |
||
| 13 | /* ------------------------------------------------------------------------------------------------ |
||
| 14 | | Traits |
||
| 15 | | ------------------------------------------------------------------------------------------------ |
||
| 16 | */ |
||
| 17 | use Presenters\PermissionPresenter; |
||
| 18 | |||
| 19 | /* ------------------------------------------------------------------------------------------------ |
||
| 20 | | Main Function |
||
| 21 | | ------------------------------------------------------------------------------------------------ |
||
| 22 | */ |
||
| 23 | /** |
||
| 24 | * Get a permission from a hashed id or fail if not found. |
||
| 25 | * |
||
| 26 | * @param string $hashedId |
||
| 27 | * |
||
| 28 | * @return self |
||
| 29 | * |
||
| 30 | * @throws \Illuminate\Database\Eloquent\ModelNotFoundException |
||
| 31 | */ |
||
| 32 | public static function firstHashedOrFail($hashedId) |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Get the ids of all permissions. |
||
| 39 | * |
||
| 40 | * @return \Illuminate\Database\Eloquent\Collection |
||
| 41 | */ |
||
| 42 | public static function getIds() |
||
| 46 | |||
| 47 | /* ------------------------------------------------------------------------------------------------ |
||
| 48 | | Check Functions |
||
| 49 | | ------------------------------------------------------------------------------------------------ |
||
| 50 | */ |
||
| 51 | /** |
||
| 52 | * Check if permission has a group. |
||
| 53 | * |
||
| 54 | * @return bool |
||
| 55 | */ |
||
| 56 | public function hasGroup() |
||
| 60 | } |
||
| 61 |