Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel cache remember

 public function index() {
        $minutes = 1440; # 1 day
        $posts = Cache::remember('posts', $minutes, function () {
            return Post::get();
        });
        return $posts;
    }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel #cache #remember
ADD COMMENT
Topic
Name
5+4 =