Laravel Classroom image

Prashant  Nigam / Student / Web Technology

To post your Question Join Classroom
Lesson Topics's No:-  First|1 | 2 | 3 | 4|Last

17.3 Retrieving Values
To retrieve an item from the cache use the get() method and supply the key, for example..1 <?php
3 $data = Cache::get('mydata');
By default, if the cached item does not exist or has expired already, the method will return NULL.
However, you can pass an optional second parameter to provide an alternate default value.
1 <?php
3 $data = Cache::get('mydata', 'complicated data');
You can also pass a closure as the second parameter and the value returned by the closure will
be used if the cache data does not exist. The closure will only be executed if the key does not


Prashant  Nigam

Skills    Laravel

Qualifications :-
Location :-,,,

  Students (0)