| 1 | <?php |
||
| 8 | class UpdateFormRequest extends FormRequest |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * The key to be used for the view error bag. |
||
| 12 | * |
||
| 13 | * @var string |
||
| 14 | */ |
||
| 15 | protected $errorBag = 'update'; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Determine if the user is authorized to make this request. |
||
| 19 | * |
||
| 20 | * @return bool |
||
| 21 | */ |
||
| 22 | public function authorize() |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Get the validation rules that apply to the request. |
||
| 29 | * |
||
| 30 | * @return array |
||
| 31 | */ |
||
| 32 | public function rules() |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Get custom attributes for validator errors. |
||
| 41 | * |
||
| 42 | * @return array |
||
| 43 | */ |
||
| 44 | public function attributes() |
||
| 51 | } |
||
| 52 |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: