Completed
Push — master ( 92c593...aaa14d )
by Tim
03:08
created

User   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 4
Bugs 0 Features 1
Metric Value
wmc 1
c 4
b 0
f 1
lcom 0
cbo 2
dl 0
loc 30
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A departments() 0 4 1
1
<?php
2
3
namespace App;
4
5
use Illuminate\Foundation\Auth\User as Authenticatable;
6
use Silber\Bouncer\Database\HasRolesAndAbilities;
7
8
class User extends Authenticatable
9
{
10
    use HasRolesAndAbilities;
11
    
12
    /**
13
     * The attributes that are mass assignable.
14
     *
15
     * @var array
16
     */
17
    protected $fillable = [
18
        'fname', 'name', 'email', 'password', 'biography',
19
    ];
20
21
    /**
22
     * The attributes that should be hidden for arrays.
23
     *
24
     * @var array
25
     */
26
    protected $hidden = [
27
        'password', 'remember_token',
28
    ];
29
30
    /**
31
     * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
32
     */
33
    public function departments()
34
    {
35
        return $this->belongsToMany('App\Departments');
36
    }
37
}
38