server cache laravel code example
Example 1: laravel cache
Cache::put('key', 'value', $seconds);
Cache::rememberForever('users', function () {
return DB::table('users')->get();
});
Cache::get('key');
Cache::has('key');
Cache::pull('key');
Example 2: php cache clear in laravel
Fatal error: Uncaught Error: Class 'Illuminate\Foundation\Application' not found in C:\xampp\htdocs\project\datatable\Laravel-Datatables-Demo\bootstrap\app.php:14
Stack trace:
thrown in C:\xampp\htdocs\project\datatable\Laravel-Datatables-Demo\bootstrap\app.php on line 14