In this short snippet, you will learn how to boost your Laravel project by caching your view, route, event and config file on Laravel Forge. To do this it's quite straight forward and what you need to do is define it on the Deployment Script.
- Login to Laravel Forge
- Select Your Site
- Scroll to the "Deploy Script" section
- Copy and paste the command below
- Press the Update button
# clear any existing cache
php artisan view:clear
php artisan route:clear
php artisan event:clear
php artisan config:clear
php artisan auth:clear-resets
# cache everything that's possible
php artisan view:cache
php artisan route:cache
php artisan event:cache
php artisan config:cache
Leave a reply