Closed rajatvermaiam closed 22 hours ago
Hey there, thanks for reporting this issue.
We'll need more info and/or code to debug this further. Can you please create a repository with the command below, commit the code that reproduces the issue as one separate commit on the main/master branch and share the repository here?
Please make sure that you have the latest version of the Laravel installer in order to run this command. Please also make sure you have both Git & the GitHub CLI tool properly set up.
laravel new bug-report --github="--public"
Do not amend and create a separate commit with your custom changes. After you've posted the repository, we'll try to reproduce the issue.
Thanks!
This is repo link that have same bug that i have described above: https://github.com/rajatvermaiam/bug-report
please follow above step to reproduce same bug in this repo.
Hi. If you put in your .htaccess a permanent redirect for a route, that will not take into account the verb so, it will redirect POST or GET request to a GET.
This is also the case for this situation. A feature might help restricting the permanent redirect by verb if not already possible.
Route::permanentRedirect()
uses Route::any()
and therefore can create a clashing route. Feel free if you want to submit a PR to improve generated routes via route:cache
but we don't classify this as a bug.
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
This is inconsistent behavior after optimize command .