Completed
Push — master ( 7187a0...60d66c )
by Mike
02:58
created

Book::author()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
eloc 1
nc 1
nop 0
1
<?php namespace GeneaLabs\LaravelModelCaching\Tests\Fixtures;
2
3
use GeneaLabs\LaravelModelCaching\CachedModel;
4
use Illuminate\Database\Eloquent\Relations\BelongsTo;
5
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
6
7
class Book extends CachedModel
8
{
9
    protected $dates = [
10
        'published_at',
11
    ];
12
    protected $fillable = [
13
        'description',
14
        'published_at',
15
        'title',
16
    ];
17
18
    public function author() : BelongsTo
19
    {
20
        return $this->belongsTo(Author::class);
21
    }
22
23
    public function stores() : BelongsToMany
24
    {
25
        return $this->belongsToMany(Store::class);
26
    }
27
}
28