Answers for "how to cache a model in laravel"

PHP
3

delete cache laravel

//Borra la cache de laravel: Solo copia y pega.
php artisan config:cache &&
php artisan route:clear &&  
php artisan view:clear && 
php artisan config:clear &&
php artisan cache:clear && 
php artisan clear-compiled
Posted by: Guest on March-29-2021
0

laravel cache

// i am using laravel versioin 8  so...... 
// use this in ur controller then
use Illuminate\Support\Facades\Cache;
// in function 
Cache::put('key', 'value', 1440);// 1 day
Cache::get('key');
Cache::has('key');
Cache::pull('key');
Cache::forget('key');// remove spacific
Cache::flush(); // remove  all
Posted by: Guest on April-14-2022

Code answers related to "how to cache a model in laravel"

Browse Popular Code Answers by Language