0

since am using laravel breez i wanted to verefie emails so i have installed laravel fortify and i did all the configuration mentioned in laravel/doc but the problem when i try to register the user i get this error Target [Laravel\Fortify\Contracts\VerifyEmailViewResponse] is not instantiable. however he is in the url(http://localhost/email/verify) and notice that in the user recive the mail of verification normaly

i try to add this providers in config.app:


App\Providers\AppServiceProvider::class,
        App\Providers\AuthServiceProvider::class,
        // App\Providers\BroadcastServiceProvider::class,
        App\Providers\EventServiceProvider::class,
        App\Providers\RouteServiceProvider::class,
        Barryvdh\Dompdf\ServiceProvider::class,
        App\Providers\FortifyServiceProvider::class

and also in FortifyServiceProvider.php i added some fonction :

public function boot(): void
    {
        Fortify::loginView(function () {
        return view('auth.login');
        });

        Fortify::registerView(function () {
            return view('auth.register');
        });

        Fortify::requestPasswordResetLinkView(function () {
            return view('auth.forgot-password');
        });

        Fortify::resetPasswordView(function () {
            return view('auth.reset-password');
        });
        Fortify::createUsersUsing(CreateNewUser::class);
        Fortify::updateUserProfileInformationUsing(UpdateUserProfileInformation::class);
        Fortify::updateUserPasswordsUsing(UpdateUserPassword::class);
        Fortify::resetUserPasswordsUsing(ResetUserPassword::class);

        RateLimiter::for('login', function (Request $request) {
            $throttleKey = Str::transliterate(Str::lower($request->input(Fortify::username())).'|'.$request->ip());

            return Limit::perMinute(5)->by($throttleKey);
        });

        RateLimiter::for('two-factor', function (Request $request) {
            return Limit::perMinute(5)->by($request->session()->get('login.id'));
        });
    }

0 Answers0