Commands.app

php artisan optimize

Optimization

Cache configuration and routes for better performance

Examples
Common usage examples

Optimize the application

php artisan optimize

Cache configuration files

php artisan config:cache

Cache routes

php artisan route:cache
Notes
  • Run before deploying to production
  • Use optimize:clear to clear all caches
Related Commands
You might also find these useful