laravel / framework

The Laravel Framework.
https://laravel.com
MIT License
32.21k stars 10.9k forks source link

Logic exception on php artisan optimize. #52511

Closed rocky5469 closed 1 month ago

rocky5469 commented 1 month ago

Laravel Version

11.20.0

PHP Version

8.3

Database Driver & Version

MySQL 8.0.33

Description

hi, i'm using laravel breeze with fortify for authentication. Recently i updated to latest laravel version. using composer update. When i use php artisan optimize before deployment. im getting logic Exception error for optimizing routes. the erorr message was like Unable to prepare route [confirm-password] for serialization. Another route has already been assigned name [password.confirm]. I never had the route named password.confirm apart from the one which ships with laravel. After looking in to route list there are two routes named password.confirm.

  1. password.confirm › Auth\ConfirmablePasswordController
  2. password.confirm › Laravel\Fortify › ConfirmablePasswordController

As i never touched the routes that ships from laravel. I tried the same with the fresh installation of laravel with breeze and fortify. The error message still exists. help me solve this.

Steps To Reproduce

a fresh laravel install with breeze and fortify. and the Optimization command

php artisan optimize

crynobone commented 1 month ago

Laravel Breeze doesn't requires Laravel Fortify. Why would you install both?

rocky5469 commented 1 month ago

oops! my bad. thanks a lot.