In Laravel have noticed there is two way to clear the cache
php artisan cache:clear
and
php artisan config:cache
However i realized only the second one working properly when changing the localization, adding laravel/passport package and etc..
What is their difference ?
php artisan config:clear is used to remove the configuration cache file. Then you can again run php artisan config:cache command to recreate the configuration cache file.
php artisan config:cache stores cached files in bootstrap/cache/config.php. So you get rename or remove that file. Now, go and test your application. It should be resolved. That’s it. We hope this post helped you to resolve error after php artisan config:cache in Laravel.
There are many types of cache available in laravel like route cache, view cache, application cache, and config cache. so we can easily clear cache using the artisan command. let’s see the following clear cache. Here below command help to Clear Laravel Application Cache.
Artisan is a command line tool provided with Laravel to administer your web app code. If your site was setup for you by a developer, it’s best to leave Artisan alone. For this tutorial, you only need to know one command. What is Laravel Config Cache? Part of why developers love Laravel is because of its modular nature.
php artisan cache:clear
- Flush the application cache
php artisan config:cache
- Create a cache file for faster configuration loading.
This is for configuration cache. This command will clear the configuration cache before it creates. More details
php artisan config:clear
- Remove the configuration cache file
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With