DEV Community

Lavender
Lavender

Posted on

Laravel: Optimization

#Composer's autoloader map

composer install --optimize-autoloader --no-dev
Enter fullscreen mode Exit fullscreen mode

#Configuration Loading

Be sure that you are only calling the env function from within your configuration files.

Once the configuration has been cached, the .env file will not be loaded and all calls
to the env function for .env variables will return null

php artisan config:cache
Enter fullscreen mode Exit fullscreen mode

#Route Loading

php artisan route:cache
Enter fullscreen mode Exit fullscreen mode

#View Loading

php artisan view:cache
Enter fullscreen mode Exit fullscreen mode

Useful links

Top comments (0)