Activity::candidate()   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\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
class Activity extends Model
8
{
9
    protected $connection = 'tenant';
10
11
    /**
12
     * The attributes that are mass assignable.
13
     *
14
     * @var array
15
     */
16
    protected $fillable = ['candidate_id', 'user_id', 'type', 'prev_value', 'new_value'];
17
18
    public function candidate()
19
    {
20
        return $this->belongsTo(Candidate::class);
21
    }
22
23
    public function user()
24
    {
25
        return $this->belongsTo(User::class)->withTrashed();
26
    }
27
}
28