laravel-auth icon indicating copy to clipboard operation
laravel-auth copied to clipboard

LogicException Unable to prepare route [logout] for serialization. Another route has already been assigned name [logout].

Open Mokei-it opened this issue 4 years ago • 5 comments
trafficstars

Hello there,

  • a fresh Laravel-auth v8.2.0 installation.
  • followed all 12 steps Installation Instructions.
  • Npm and built cache.
  • "php artisan route:cache" returns logic exception in the subject.

Does it happen to me only? Am I missing something?

  • PHP 7.4.1
  • Windows 10, 20H2
  • Wampserver 3.2.5

UnableToPrepareRoute

Mokei-it avatar Apr 16 '21 14:04 Mokei-it

It happened to me today as well, I havent dug into it too deeply yet, but I believe it is becausse in the resource for the logout route it is used twice in the core laravel-auth files. But havent dug into it deeply enough yet. I have other issues :)

TheLiminalDream avatar Apr 23 '21 22:04 TheLiminalDream

Hi all, does anyone have an update for this issue. Just ran into this issue as well.

ImTheRealOne avatar May 17 '21 22:05 ImTheRealOne

Just comment out this line:

https://github.com/jeremykenedy/laravel-auth/blob/master/routes/web.php#L50

It will be removed from the project later.

Thanks,

jeremykenedy avatar May 17 '21 22:05 jeremykenedy

Thank you. Do we also remove the routes from web.php for the following errors?

Unable to prepare route [profile/{username}/updateUserAccount] for serialization. Another route has already been assigned name [{username}]. Unable to prepare route [profile/{username}/updateUserPassword] for serialization. Another route has already been assigned name [{username}]. Unable to prepare route [profile/{username}/deleteUserAccount] for serialization. Another route has already been assigned name [{username}].

Route::put('profile/{username}/updateUserAccount', [
    'as'   => '{username}',
    'uses' => 'App\Http\Controllers\ProfilesController@updateUserAccount',
]);
Route::put('profile/{username}/updateUserPassword', [
    'as'   => '{username}',
    'uses' => 'App\Http\Controllers\ProfilesController@updateUserPassword',
]);

Route::delete('profile/{username}/deleteUserAccount', [
    'as'   => '{username}',
    'uses' => 'App\Http\Controllers\ProfilesController@deleteUserAccount',
]);

ImTheRealOne avatar May 18 '21 04:05 ImTheRealOne

Is this still an issue?

jeremykenedy avatar Sep 09 '22 04:09 jeremykenedy