0

I am trying to use Laravel Fortify for authentication. All routes work fine except for email verification.

I have done everything according to docs as far as I understand:

  1. Impemented Illuminate\Contracts\Auth\MustVerifyEmail interface in the User model

  2. emailVerification feature is enabled in fortify configuration file's features array

     'features' => [
     Features::registration(),
     Features::resetPasswords(),
     Features::emailVerification(),
     // Features::updateProfileInformation(),
     // Features::updatePasswords(),
     // Features::twoFactorAuthentication(),
    

    ],

  3. Added to boot method of FortifyServiceProvider

         Fortify::verifyEmailView(function () {
         return view('auth.verify');
     });
    

Yet I keep getting the following error:

Route [verification.verify] not defined.

And verification.verify route is not in artisan route:list although it should be added to the list like login and register routs by Laravel Fortify.

Why is the route missing/not loaded?

I tried artisan route:clear and cache:clear without luck.

Laravel v10.4.1

1 Answer 1

0

I was editing wrong Fortify configuration file:

vendor/laravel/fortify/config/fortify.php

While I should edit that file:

config/fortify.php

Now everything works as expected.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.