Home > OS >  How to set name for a laravel fortify route?
How to set name for a laravel fortify route?

Time:10-20

I'm a little curious, sorry for the silly question.

I wanted to get the route for login in the Laravel 8 Fortify stack, it seems I cannot use "/login" directly because it will append on URL. so I wanted to use

{{ route('login') }}

But the problem is, it gives me an error 'route not defined'. When I'm running the command route:list it shows a blank name for login and register but has a name for 'logout'

I wonder how I can give a name for the fortify route, as it is not declared in the routes.web

CodePudding user response:

Try:

php artisan route:clear
php artisan route:cache

This will clear all the route cache in Laravel.

CodePudding user response:

You should Try :

php artisan optimize:clear

It help you clear your application cache route and config as well.

  • Related