Reply::user()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
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