Completed
Push — dev5 ( f3ede3...502bc5 )
by Ron
08:16
created

User::hasRole()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 3
c 1
b 0
f 0
nc 2
nop 1
dl 0
loc 7
rs 10
1
<?php
2
3
namespace App;
4
5
use Illuminate\Notifications\Notifiable;
6
use Illuminate\Foundation\Auth\User as Authenticatable;
7
8
class User extends Authenticatable
9
{
10
    use Notifiable;
1 ignored issue
show
Bug introduced by
The trait Illuminate\Notifications\Notifiable requires the property $email which is not provided by App\User.
Loading history...
11
12
    /**
13
     * The attributes that are mass assignable.
14
     *
15
     * @var array
16
     */
17
    protected $fillable = [
18
        'username', 'first_name', 'last_name', 'email', 'password', 'password_expires', 'active', 'is_installer'
19
    ];
20
21
    /**
22
     * The attributes that should be hidden for arrays.
23
     *
24
     * @var array
25
     */
26
    protected $hidden = [
27
        'password', 'remember_token', 'is_installer'
28
    ];
29
    
30
    //  Database primary key
31
    protected $primaryKey = 'user_id';
32
    
33
    public function UserLogins()
34
    {
35
        return $this->hasMany('App\UserLogins', 'user_id', 'user_id');
36
    }
37
    
38
    public function systemFiles()
39
    {
40
        return $this->hasMany('App\SystemFiles', 'user_id', 'user_id');
41
    }
42
    
43
    public function customerFavs()
44
    {
45
        return $this->belongsTo('App\CustomerFavs', 'user_id', 'user_id');
46
    }
47
    
48
    public function customerNotes()
49
    {
50
        return $this->belongsTo('App\CustomerNotes', 'user_id', 'user_id');
51
    }
52
    
53
    public function techTips()
54
    {
55
        return $this->belongsTo('App\TechTips', 'user_id', 'user_id');
56
    }
57
    
58
    public function techTipComments()
59
    {
60
        return $this->belongsTo('App\TechTipComments', 'user_id', 'user_id');
61
    }
62
    
63
    public function fileLinks()
64
    {
65
        return $this->hasMany('App\FileLinks', 'user_id', 'user_id');
66
    }
67
}
68