Skip to content

Laravel 7.x - artisan route:cache always generates a different file ? #33963

Answered by MircoBabin
MircoBabin asked this question in General
Discussion options

You must be logged in to vote

Mathias E. sent me an email: You could just name all your routes, it's not really a good practice to have unnamed routes anyway

Thanks for this suggestion. I just named my unnamed routes "unnamed.1" to "unnamed.259". Yep there are 259 unnamed routes, because this project originates from Laravel 4.2 and was shifted to Laravel 7.

After naming everything (don't forget api.php and other files in the routes folder), the php artisan route:cache is finally determenistic.

See also #36448

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by MircoBabin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant