Increase laravel performance

Updated: 20th December 2019
Tags: php laravel

You may think these steps are joke but after making these simple steps your laravel app will be responding much faster, probably 100-200 ms faster.

Routes caching

php artisan route:cache

If you have closures, you must replace them with controller actions. This is very important. Then run command again.

IMPORTANT: After every deploy of changed routes, you must run this command.

Config caching

php artisan config:cache

IMPORTANT: After every deploy of changed config you must run this command.

Optimize classmap

php artisan optimize --force