Issue
I have created a small application in Laravel 8. Everything is fine, but when I wanted to configure the cache I had an error that one route has the same name as another.
Reviewing the routes I found duplicate named routes, but since I'm new to Laravel, I don't know how to solve this problem. I do not know what to do to have two routes with the same name I hope you can guide me a bit.
Solution
Just override the laravel auth routes
Route::post('password/email', [
'as' => 'laravel.password.email',
'uses' => 'App\Http\Controllers\Auth\ForgotPasswordController@sendResetLinkEmail'
]);
Route::get('password/reset', [
'as' => 'laravel.password.request',
'uses' => 'App\Http\Controllers\Auth\ForgotPasswordController@showLinkRequestForm'
]);
But dont forget to change the old route names
Answered By - ibra
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.