Clearing the Laravel System Cache


These methods of clearing the cache do not clear the cache in the browser for site users and do not affect the manually created caching system.
  1. Connect to hosting via SSH.
  2. Change to your project directory:
    cd ~/example.com/www/
  3. To clear the desired cache, run the appropriate command:
    • Reoptimizing the loader class:
      /usr/local/php73/bin/php artisan optimize
    • Clearing the application cache:
      /usr/local/php73/bin/php artisan cache:clear
    • Clearing the route cache:
      /usr/local/php73/bin/php artisan route:cache
    • Clearing the view frontend cache:
      /usr/local/php73/bin/php artisan view:clear
    • Clearing the configuration cache:
      /usr/local/php73/bin/php artisan config:cache