Completed
Push — master ( 63f097...c0de6e )
by Guilherme Luiz Argentino
05:34
created

User::emails()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
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;
11
12
    /**
13
     * The attributes that are mass assignable.
14
     *
15
     * @var array
16
     */
17
    protected $fillable = [
18
        'name', 
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
    protected $casts = [
31
        'confirmed' => 'boolean',
32
    ];
33
    
34 1
    public function oauthIdentities()
35
    {
36 1
        return $this->hasMany(OauthIdentity::class);
37
    }
38
    
39 1
    public function emails()
40
    {
41 1
        return $this->hasMany(Email::class);
42
    }
43
}
44