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

Tag::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 Tag extends Model
8
{
9
    use Cachable;
10
11
    protected $fillable = [
12
        "name",
13
    ];
14
15
    public function posts() : MorphToMany
16
    {
17
        return $this->morphedByMany(Post::class, "taggable");
18
    }
19
}
20