PHP code example of spiritix / lada-cache
1. Go to this page and download the library: Download spiritix/lada-cache 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/ */
spiritix / lada-cache example snippets
use Spiritix\LadaCache\Database\LadaCacheTrait;
class Car extends Model
{
use LadaCacheTrait;
}
// Eloquent
$user = User::where('id', $id)->withoutCache()->first();
// Query Builder
DB::table('users')->where('id', $id)->withoutCache()->update(['name' => 'New']);
bash
php artisan vendor:publish --provider="Spiritix\LadaCache\LadaCacheServiceProvider"