I want that all cached data in my Laravel web site be clear and recreate after every crud operation(adding, edit, update and delete) on posts table. how can I do that?
CodePudding user response:
You can call php artisan command like this after CRUD operations:
script
Artisan::call('cache:clear');
Or you can use Cache facade:
Cache::flush();
For more information Laravel Cache
CodePudding user response:
Con el siguiente comando te puede funcionar
Cache::flush();