configuration

Create a cached routes file for faster route registration in production.

php artisan php artisan route:cache

Syntax

Syntax
php artisan route:cache

Explanation

Serializes all routes into a single PHP file, bypassing file scanning. Dramatically speeds up route loading. MUST be cleared when adding/removing routes. Not compatible with Closure routes.

Example

Example
php artisan route:cache

Explanation

Serializes all routes into a single PHP file, bypassing file scanning. Dramatically speeds up route loading. MUST be cleared when adding/removing routes. Not compatible with Closure routes.