PHP code example of slydeath / laravel5-nested-caching

1. Go to this page and download the library: Download slydeath/laravel5-nested-caching 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/ */

    

slydeath / laravel5-nested-caching example snippets


SlyDeath\NestedCaching\NestedCachingServiceProvider::class,

use SlyDeath\NestedCaching\NestedCacheable;

class User extends Model
{
    use NestedCacheable;
}

use SlyDeath\NestedCaching\NestedCacheable;

class CarUser extends Model
{
    use NestedCacheable;

    protected $touches = ['user']; // Указываем родителя

    public function user()
    {
        return $this->belongsTo(User::class);
    }
}
bash
php artisan vendor:publish --provider="SlyDeath\NestedCaching\NestedCachingServiceProvider" --tag=config