Reply::thread()   A
last analyzed

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
namespace Seongbae\Discuss\Models;
3
use Illuminate\Database\Eloquent\Model;
4
5
class Reply extends Model
6
{
7
	/**
8
     * The attributes that are mass assignable.
9
     *
10
     * @var array
11
     */
12
    protected $fillable = [
13
        'body',
14
        'user_id',
15
        'user_type'
16
    ];
17
18
    public function user()
19
    {
20
        return $this->morphTo();
21
    }
22
23
    public function thread()
24
    {
25
        return $this->belongsTo(Thread::class, 'thread_id');
26
    }
27
}
28