Laravel Classroom image

Yasar  Khan / Professional / Web Technology

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

17.3 Retrieving Values
To retrieve an item from the cache use the get() method and supply the key, for example..1 <?php
2
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
2
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
exist.

 
 
 

Yasar  Khan

Skills    Laravel

Qualifications :-
Location :-Dehradun,Dehradun,Uttarakhand,India
Description:- Hi i am yasar working as web developer since last 3 years.
Explore
 

  Students (0)