1. Go to this page and download the library: Download rogervila/laravel-autocache 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/ */
Post::disableAutoCache();
// Do your database changes here
Post::enableAutoCache();
LaravelAutoCache\AutocacheServiceProvider::class,
/**
* List of models that implement autocache by default.
* Models have to also implement the Autocache trait
* in order to work properly
*/
'models' => [
App\Product::class,
],
namespace App;
use Illuminate\Database\Eloquent\Model;
use LaravelAutoCache\Autocache;
class Product extends Model
{
use Autocache;
...
sh
php artisan vendor:publish --provider=" LaravelAutoCache\AutocacheServiceProvider"
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.