1. Go to this page and download the library: Download singlequote/laravel-cacher library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
singlequote / laravel-cacher example snippets
namespace App;
use Illuminate\Foundation\Auth\User as Authenticatable; //<= basic shizzle
use Illuminate\Contracts\Auth\MustVerifyEmail; //<= basic shizzle
use SingleQuote\Cacher\Traits\Cacher; //⇐ this one
class User extends Authenticatable implements MustVerifyEmail
{
use Cacher; //<=
use App\User;
$users = User::whereEmail('[email protected]')->remember(); //<= default ttl is 7 days
$users = User::whereEmail('[email protected]')->remember(3600); //<= 1 hour
//or keep it forever by your side <3
$users = User::whereEmail('[email protected]')->rememberForever();