ProjectMilestone::user()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace App;
4
5
use Illuminate\Database\Eloquent\Model;
6
use Illuminate\Database\Eloquent\SoftDeletes;
7
8
class ProjectMilestone extends Model
9
{
10
    use SoftDeletes;
11
    
12
    /* @var array $fillable The fields which are mass assignable */
13
    protected $fillable = ['title', 'user_id', 'project_id', 'completed_at'];
14
15
    /* @var array $dates The fields which are mutated to carbon instances */
16
    public $dates = ['completed_at'];
17
18
    /**
19
     * A milestone belongs to a project
20
     *
21
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
22
     */
23
    public function project()
24
    {
25
        return $this->belongsTo(Project::class);
26
    }
27
28
    /**
29
     * A milestone belongs to a user
30
     *
31
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
32
     */
33
    public function user()
34
    {
35
        return $this->belongsTo(User::class);
36
    }
37
}
38