Reply   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 21
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A topic() 0 3 1
A user() 0 3 1
1
<?php
2
3
namespace App\Entities;
4
5
use Carbon\Carbon;
6
use Illuminate\Database\Eloquent\Model;
7
use Illuminate\Database\Eloquent\SoftDeletes;
8
9
/**
10
 * Class Reply.
11
 *
12
 * @property int $id
13
 * @property int $user_id
14
 * @property int $topic_id
15
 * @property string $content
16
 * @property Carbon $created_at
17
 * @property Carbon $updated_at
18
 */
19
class Reply extends Model
20
{
21
    use SoftDeletes;
22
23
    protected $fillable = [
24
        'user_id',
25
        'topic_id',
26
        'content',
27
    ];
28
29
    /**
30
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
31
     */
32
    public function user()
33
    {
34
        return $this->belongsTo(User::class);
35
    }
36
37
    public function topic()
38
    {
39
        return $this->belongsTo(Topic::class);
40
    }
41
}
42