1 | <?php |
||
18 | abstract class Request extends LaravelFormRequest |
||
19 | { |
||
20 | |||
21 | use HashIdTrait; |
||
22 | use AuthorizationTrait; |
||
23 | |||
24 | /** |
||
25 | * Overriding this function to modify the any user input before |
||
26 | * applying the validation rules. |
||
27 | * |
||
28 | * @return array |
||
29 | */ |
||
30 | public function all() |
||
40 | |||
41 | /** |
||
42 | * apply validation rules to the ID's in the URL, since Laravel |
||
43 | * doesn't validate them by default! |
||
44 | * |
||
45 | * Now you can use validation riles like this: `'id' => 'required|integer|exists:items,id'` |
||
46 | * |
||
47 | * @param array $requestData |
||
48 | * |
||
49 | * @return array |
||
50 | */ |
||
51 | private function applyValidationRulesToUrlParams(Array $requestData) |
||
61 | |||
62 | /** |
||
63 | * Overriding this function to throw a custom |
||
64 | * exception instead of the default Laravel exception. |
||
65 | * |
||
66 | * @param \Illuminate\Contracts\Validation\Validator $validator |
||
67 | * |
||
68 | * @return mixed|void |
||
69 | */ |
||
70 | public function failedValidation(Validator $validator) |
||
74 | } |
||
75 |
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.