Home / Snippets / How to Cache Everything on Laravel Forge Deploy Scripts
How to Cache Everything on Laravel Forge Deploy Scripts cover

How to Cache Everything on Laravel Forge Deploy Scripts

505

2 years ago

0 comments

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.
  1. Login to Laravel Forge
  2. Select Your Site
  3. Scroll to the "Deploy Script" section
  4. Copy and paste the command below
  5. 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
notion avatar

Alaz

Week-end developer currently experimenting with web, mobile, and all things programming.

Topics:

Frontend

Resource

Average

Average

Support Us

If you like our tutorial, support us by being our Patreon or buy us some coffee ☕️

Welcome to PostSrc V3

PostSrc Dark Logo

You have to login to favorite this