• Calculating...
  • 5 years ago
  • 6.5K Views
  • Archived This is an Archived post.
    The content within this may not be used or replaced with newer versions.

Clearing Route, View, Config Cache in Laravel 5.8

Sometimes you may face an issue that the changes to the Laravel Project may not update on the web. This occures when the application is served by the cache. In this tutorial, You’ll learn to Clear ApplicationRouteConfigBrowser Cache in Laravel Project.

 

Go to your Laravel Project and open the Terminal. Here you can type the commands to clear cache as show below :

 

  1. Clear Route Cache

Type the following command to clear route cache of the Laravel application.

php artisan route:cache
 
  1. Optimize Laravel Cache 
php artisan optimize
 
  1. Clear Application Cache

Type the following command to clear application cache of the Laravel application.

php artisan cache:clear
 
  1. Clear Configuration Cache

Type the following command to clear configuration cache of the Laravel application.

 
php artisan config:cache
 
  1. Clear View Cache

Type the following command to clear view cache of the Laravel application.

php artisan view:clear
 
  1. Clear Browser Cache

You can clear the cache by defining the command inside the router.Then access this URL in the browser to clear the cache of Laravel project.

Route::get('/clear-cache', function() {
    Artisan::call('cache:clear');
    return "Cache is cleared";
});
 

Hope this tutorial helped you! Feel free to drop your opinion at the comment section.

Share:

Related Post

CRUD Operations In Laravel 8

This tutorial is created to illustrate the basic CRUD (Create , Read, Update, Delete) operation using SQL with Laravel 8. Laravel is one of the fastest-growing frameworks for PHP.

  • 3 years ago

Scheduling Tasks with Cron Job in Laravel 5.8

Cron Job is used to schedule tasks that will be executed every so often. Crontab is a file that contains a list of scripts, By editing the Crontab, You can run the scripts periodically.

  • 5 years ago

Connecting Multiple Databases in Laravel 5.8

This tutorial is created to implement multiple database connections using mysql. Let’s see how to configure multiple database connections in Laravel 5.8.

  • 5 years ago

Integrating Google ReCaptcha in Laravel 5.8

reCAPTCHA is a free service from Google. It’s a CAPTCHA-like system designed to recognize that the user is human and, at the same time, assist in the digitization of books. It helps to protects your w

  • 5 years ago

Import, Export from Excel to Database in Laravel 5.8, 5.7, 5

This tutorial is created to Import, Export data from an excel sheet to database in Laravel Framework using maatwebsite/excel package. It provides an easy way to import and export using database model.

  • 5 years ago