Passed
Push — next ( bbb9c5...d20d04 )
by Bas
07:19 queued 03:59
created

House::head()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace TestSetup\Models;
4
5
use LaravelFreelancerNL\Aranguent\Eloquent\Model;
6
7
class House extends Model
8
{
9
    protected $table = 'houses';
10
11
    protected $fillable = [
12
        'id',
13
        'name',
14
        'location_id',
15
    ];
16
17
    /**
18
     * Get the last known residence of the character.
19
     */
20
    public function head()
21
    {
22
        return $this->belongsTo(Character::class, 'led_by');
23
    }
24
25
    /**
26
     * Get all of the tags for the post.
27
     */
28
    public function tags()
29
    {
30
        return $this->morphToMany(Tag::class, 'taggable')
31
            ->using(Taggable::class);
32
    }
33
}
34