Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Route names should always be unique. #1604

Closed
Kcchouette opened this issue Sep 2, 2024 · 2 comments
Closed

Route names should always be unique. #1604

Kcchouette opened this issue Sep 2, 2024 · 2 comments

Comments

@Kcchouette
Copy link
Contributor

Route::get('forgottenpassword', [ForgotPasswordController::class, 'showLinkRequestForm'])->name('forgottenpassword');
Route::post('forgottenpassword', [ForgotPasswordController::class, 'showLinkRequestForm'])->name('forgottenpassword');

To Reproduce
Steps to reproduce the behavior:

  1. run php artisan route:cache
  2. See the error Unable to prepare route [forgottenpassword] for serialization. Another route has already been assigned name [forgottenpassword].

Expected behavior

Additional context
https://laravel.com/docs/11.x/routing#named-routes:

Route names should always be unique.

@Kcchouette
Copy link
Contributor Author

There are multiples non-unique route name (series, search, logout, profile_delete, profiledit, ...)

@jjaomni
Copy link

jjaomni commented Sep 6, 2024

woooooooooo!!!! thanks..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants