From the docs:
Optimizing Route Loading
If you are building a large application with many routes, you should
make sure that you are running the route:cache
Artisan command during
your deployment process:
php artisan route:cache
This command reduces all of your route registrations into a single
method call within a cached file, improving the performance of route
registration when registering hundreds of routes.
You should only run php artisan route:cache
during deployment, while you develop locally you shouldn't cache your routes, otherwise new routes that you create wont be registered until you run php artisan route:clear
or php artisan route:cache
again.
php artisan route:cache
// clears the route cache and then re caches the routes
php artisan route:clear
// clears the route cache
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…