PHP code example of periloso / laravel-blade-directives-extended

1. Go to this page and download the library: Download periloso/laravel-blade-directives-extended 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/ */

    

periloso / laravel-blade-directives-extended example snippets


Cache::tags('views')->flush();

use Laracasts\Matryoshka\Cacheable;

class Post extends Eloquent
{
    use Cacheable;
}



namespace App;

use Laracasts\Matryoshka\Cacheable;
use Illuminate\Database\Eloquent\Model;

class Note extends Model
{
    use Cacheable;

    protected $touches = ['card'];

    public function card()
    {
        return $this->belongsTo(Card::class);
    }
}
bash
php artisan view:clear
 bash
@cache($card)
    <article class="Card">
        <h2>{{ $card->title }}</h2>

        <ul>
            @foreach ($card->notes as $note)
                @ache