Reply   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A user() 0 4 1
A thread() 0 4 1
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