1 | <?php |
||
16 | abstract class Request extends LaravelFormRequest |
||
17 | { |
||
18 | use RequestTrait; |
||
19 | use HashIdTrait; |
||
20 | |||
21 | /** |
||
22 | * check if a user has permission to perform an action. |
||
23 | * User can set multiple permissions (separated with "|") and if the user has |
||
24 | * any of the permissions, he will be authorize to proceed with this action. |
||
25 | * |
||
26 | * @return bool |
||
27 | */ |
||
28 | public function hasAccess(User $user = null) |
||
41 | |||
42 | /** |
||
43 | * Check if the submitted ID (mainly URL ID's) is the same as |
||
44 | * the authenticated user ID (based on the user Token). |
||
45 | * |
||
46 | * @return bool |
||
47 | */ |
||
48 | public function isOwner() |
||
52 | |||
53 | } |
||
54 |
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.