Occasionally, after encountering the problem "I can't see my changes", you may need to make a lot of adjustments to your project configurations and views. Using Laravel, you can clear your cache from your command prompt if these changes fail to help. In this post, we will learn how to clear the cache using Laravel cache clear commands.
Here is what we will discuss:
How The route cache can be cleared using Laravel commands
How to clear cache in Laravel apps
How to clean out the Laravel Config cache
How to clear Laravel view cache
How to reoptimize classes in Laravel using the artisan command prompt.
How to clear Cache using Laravel commands
You can use the following Laravel commands to clear your cache:
Clearing Route Cache: If you would like to remove the route cache in Laravel, then you should use the following command
php artisan route:cache |
Clearing Laravel application cache: To clear the application cache in Laravel, simply run the command
php artisan cache: clear |
Clear Config Cache: In Laravel, you may need to clean the configuration cache from time to time. To do this, use the following command
php artisan configuration:cache |
Clear the Laravel view cache: To clear your view cache in Laravel, open a command line and use the following command
view:clear php artisan |
Reoptimized Class: Class loaders may sometimes be the source of problems. To resolve these issues, use the following command to reoptimize your class loaders
optimize php artisan |
That’s all about clearing cache in Laravel PHP
Article Contributed By :
|
|
|
|
837 Views |