Completed
Push — master ( 1cb7f3...033b4b )
by Daniel Rodrigues
05:09
created

User::workoutPlan()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace API\Models;
4
5
use API\Traits\UuidTrait;
6
use Illuminate\Foundation\Auth\User as Authenticatable;
7
use Illuminate\Database\Eloquent\SoftDeletes;
8
9
class User extends Authenticatable
10
{
11
    use UuidTrait;
12
    use SoftDeletes;
13
14
    protected $table = 'user';
15
    protected $primaryKey = 'id';
16
17
    protected $fillable = [
18
        'uuid', 'first_name', 'last_name', 'email', 'password'
19
    ];
20
21
    protected $hidden = [
22
        'password',
23
    ];
24
25
    protected $dates = [
26
        'deleted_at'
27
    ];
28
29
    public function workoutPlan()
30
    {
31
        return $this->hasMany('API\Models\WorkoutPlan');
32
    }
33
}