| 1 | <?php |
||
| 9 | class ResetPasswordController extends Controller |
||
| 10 | { |
||
| 11 | /* |
||
| 12 | |-------------------------------------------------------------------------- |
||
| 13 | | Password Reset Controller |
||
| 14 | |-------------------------------------------------------------------------- |
||
| 15 | | |
||
| 16 | | This controller is responsible for handling password reset requests |
||
| 17 | | and uses a simple trait to include this behavior. You're free to |
||
| 18 | | explore this trait and override any methods you wish to tweak. |
||
| 19 | | |
||
| 20 | */ |
||
| 21 | |||
| 22 | use ResetsPasswords; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Where to redirect users when the intended url fails. |
||
| 26 | */ |
||
| 27 | protected function redirectTo() |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Display the password reset view for the given token. |
||
| 34 | * |
||
| 35 | * If no token is present, display the link request form. |
||
| 36 | * |
||
| 37 | * @param \Illuminate\Http\Request $request |
||
| 38 | * @param string|null $token |
||
| 39 | * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View |
||
| 40 | */ |
||
| 41 | public function showResetForm(Request $request, $token = null) |
||
| 47 | } |
||
| 48 |
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: