Laravel Artisan Commands to Clear Cache

vinoy · · 2728 Views

In this post, You will learn how to clear route cache, application cache, config cache, view cache, and reoptimized class in a Laravel using the artisan commands.

Clear Route Cache in Laravel

php artisan route:cache

Clear Application Cache in Laravel

php artisan cache:clear

Clear Config Cache in Laravel

php artisan config:cache

Clear View Cache in Laravel

php artisan view:clear

Reoptimize Class

php artisan optimize

Conclusion

Now you have learned how to utilize the php artisan command to clear the cache from your Laravel application. Go forth and try these super wonderful artisan commands and let us know how these commands are helping you.

0

Please login or create new account to add your comment.

0 comments
You may also like:

Laravel Facades: Simplifying Code and Improve Readability

As an integral part of Laravel, a renowned PHP framework, Facades provide a static interface to classes stored in the application's service container. They serve as static proxies (...)
Harish Kumar

What is Laravel’s Service Container and How to Use Dependency Injection in Laravel App

Dependency injection and inversion of control are vital in clean web development. They make writing maintainable, testable code possible. Laravel is a famous PHP framework that (...)
Harish Kumar

Secure Your SPA with Laravel Sanctum: A Step-by-Step Guide

In today's web development landscape, Single Page Applications (SPAs) are increasingly popular. But securing their interaction with backend APIs is crucial. Laravel Sanctum provides (...)
Harish Kumar

Multi-Authentication with Guards in Laravel

Laravel's robust authentication system provides a powerful mechanism for securing your application. To cater to scenarios where you need different user roles with distinct login (...)
Harish Kumar

Laravel Pint & VS Code: Automate Your Code Formatting

Laravel Pint is an opinionated PHP code style fixer built on top of PHP-CS-Fixer, designed to simplify the process of ensuring clean and consistent code style in Laravel projects. (...)
Harish Kumar

Laravel Clockwork: A Deep Dive into Debugging, Profiling Skills and Best Practices

In the world of web development, building complex applications often comes with the challenge of identifying and resolving performance bottlenecks. This is where a reliable debugging (...)
Harish Kumar