Laravel\Fortify\Actions\RedirectIfTwoFactorAuthenticatable calls a non-interface method ->getModel() on the user provider class obtained from the constructor argument $guard.
Illuminate\Contracts\Auth\UserProvider does not declare ->getModel() as a method but Illuminate\Auth\EloquentUserProvider implements it whereas Illumintate\Auth\DatabaseUserProvider does not.
Fortify should not call methods that are not part of the interface.
Steps To Reproduce:
Change the user provider setting in config/auth.php to use the "database" setting instead of "eloquent".
Attempting to log in throws an error "Call to undefined method Illuminate\Auth\DatabaseUserProvider::getModel()"
Description:
Laravel\Fortify\Actions\RedirectIfTwoFactorAuthenticatable
calls a non-interface method->getModel()
on the user provider class obtained from the constructor argument$guard
.Illuminate\Contracts\Auth\UserProvider
does not declare->getModel()
as a method butIlluminate\Auth\EloquentUserProvider
implements it whereasIllumintate\Auth\DatabaseUserProvider
does not.Fortify should not call methods that are not part of the interface.
Steps To Reproduce:
Change the user provider setting in
config/auth.php
to use the "database" setting instead of "eloquent". Attempting to log in throws an error "Call to undefined method Illuminate\Auth\DatabaseUserProvider::getModel()"