Completed
Pull Request — master (#372)
by Mike
31:01 queued 16:07
created

UncachedTag::posts()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php namespace GeneaLabs\LaravelModelCaching\Tests\Fixtures;
2
3
use GeneaLabs\LaravelModelCaching\Traits\Cachable;
4
use Illuminate\Database\Eloquent\Model;
5
use Illuminate\Database\Eloquent\Relations\MorphToMany;
6
7
class UncachedTag extends Model
8
{
9
    protected $fillable = [
10
        "name",
11
    ];
12
    protected $table = "tags";
13
14
    public function posts() : MorphToMany
15
    {
16
        return $this->morphedByMany(UncachedPost::class, "taggable");
17
    }
18
}
19