1 | <?php namespace Arcanesoft\Auth\Models; |
||
11 | class Permission extends BasePermissionModel |
||
12 | { |
||
13 | /* ------------------------------------------------------------------------------------------------ |
||
14 | | Getters & Setters |
||
15 | | ------------------------------------------------------------------------------------------------ |
||
16 | */ |
||
17 | /** |
||
18 | * Get the role hash id. |
||
19 | * |
||
20 | * @return string |
||
21 | */ |
||
22 | public function getHashedIdAttribute() |
||
26 | |||
27 | /* ------------------------------------------------------------------------------------------------ |
||
28 | | Main Function |
||
29 | | ------------------------------------------------------------------------------------------------ |
||
30 | */ |
||
31 | /** |
||
32 | * Get a permission from a hashed id or fail if not found. |
||
33 | * |
||
34 | * @param string $hashedId |
||
35 | * |
||
36 | * @return self |
||
37 | * |
||
38 | * @throws \Illuminate\Database\Eloquent\ModelNotFoundException |
||
39 | */ |
||
40 | public static function firstHashedOrFail($hashedId) |
||
46 | |||
47 | /** |
||
48 | * Get the ids of all permissions. |
||
49 | * |
||
50 | * @return \Illuminate\Database\Eloquent\Collection |
||
51 | */ |
||
52 | public static function getIds() |
||
56 | |||
57 | /* ------------------------------------------------------------------------------------------------ |
||
58 | | Check Functions |
||
59 | | ------------------------------------------------------------------------------------------------ |
||
60 | */ |
||
61 | /** |
||
62 | * Check if permission has a group. |
||
63 | * |
||
64 | * @return bool |
||
65 | */ |
||
66 | public function hasGroup() |
||
70 | } |
||
71 |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.