Completed
Push — master ( d3922b...937be3 )
by Christopher
01:16
created

Comment::commentable()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Chriscreates\Projects\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
use Illuminate\Database\Eloquent\Relations\MorphTo;
7
8
class Comment extends Model
9
{
10
    protected $table = 'comments';
11
12
    public $primaryKey = 'id';
13
14
    public $guarded = ['id'];
15
16
    public $timestamps = true;
17
18
    public function commentable() : MorphTo
19
    {
20
        return $this->morphTo();
21
    }
22
}
23