“Laravel Cache Ingat” Kode Jawaban

Bersihkan semua cache Laravel

/**[SAFE] Clears all cache with 1 line!**/ 
php artisan route:clear &&  
php artisan view:clear && 
php artisan config:clear &&
php artisan cache:clear && 
php artisan clear-compiled
Outrageous Ocelot

Bersihkan cache Laravel

php artisan view:clear 
php artisan cache:clear
php artisan route:clear
php artisan config:clear
php artisan optimize
Wicked Wallaby

Laravel Clear Cache

//Laravel 7 / 2021-01
php artisan cache:clear
php artisan route:clear
php artisan config:clear
php artisan optimize
Mère Thorrésa

Laravel Clear Cache

// Keep life simple :) 
sail artisan optimize:clear
or
php artisan optimize:clear

// Output: Cached events cleared!
"
Compiled views cleared!
Application cache cleared!
Route cache cleared!
Configuration cache cleared!
Compiled services and packages files removed!
Caches cleared successfully!
"
13Garth

Bersihkan cache Laravel

php artisan view:clear
php artisan config:clear
php artisan route:clear
php artisan cache:clear
php artisan clear-compiled
Modern Mouse

Laravel Cache Ingat

 public function index() {
        $minutes = 1440; # 1 day
        $posts = Cache::remember('posts', $minutes, function () {
            return Post::get();
        });
        return $posts;
    }
Abdullah Mohamed

Jawaban yang mirip dengan “Laravel Cache Ingat”

Pertanyaan yang mirip dengan “Laravel Cache Ingat”

Lebih banyak jawaban terkait untuk “Laravel Cache Ingat” di PHP

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya