Laravel Version
11.31.0
PHP Version
8.3.13
Database Driver & Version
No response
Description
inconsistent behavior in routes web.php file after php artisan optimize and before php artisan optimize. i am providing steps to reproduce same behavior, it will be easy to understand there.
Steps To Reproduce
in web.php suppose we have these routes like below:
Route::permanentRedirect('/', '/en'); //1st route
Route::get('en', [HomeController::class, 'homepage']); //2nd route
Route::post('/', [GetController::class, 'getMedia']); //3rd route
- Enter "php artisan optimize:clear" command.
- And submit an HTML form by " form action="{{route('download')}}" method="post" from second route. The third route is getting control.
- Enter "php artisan optimize" command.
- And submit an HTML form by " form action="{{route('download')}}" method="post" from second route.. The first route is getting control.
This is inconsistent behavior after optimize command .