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

StoreWithUncachedBooks   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 15
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A books() 0 4 1
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\BelongsToMany;
6
7
class StoreWithUncachedBooks extends Model
8
{
9
    use Cachable;
10
11
    protected $fillable = [
12
        'address',
13
        'name',
14
    ];
15
    protected $table = "stores";
16
17
    public function books() : BelongsToMany
18
    {
19
        return $this->belongsToMany(UncachedBook::class, "book_store", "store_id", "book_id");
20
    }
21
}
22