Answers for "laravel store value cache"

PHP
0

cache clear in laravel

php artisan cache:clear
php artisan view:clear
php artisan route:clear
php artisan clear-compiled
php artisan config:cache
Posted by: Guest on December-20-2020
1

laravel cache remember

public function index() {
        $minutes = 1440; # 1 day
        $posts = Cache::remember('posts', $minutes, function () {
            return Post::get();
        });
        return $posts;
    }
Posted by: Guest on July-06-2021

Code answers related to "laravel store value cache"

Browse Popular Code Answers by Language