Completed
Push — master ( e6d8d4...37cc1c )
by Matt
13:30
created

User::activation()   A

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\Models;
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
        'username', 'email', 'password',
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
    public function activation()
31
    {
32
        return $this->hasOne('App\Models\Activation');
33
    }
34
35
    public function profile()
36
    {
37
        return $this->hasOne('App\Models\Profile');
38
    }
39
40
    public function quizzes()
41
    {
42
        return $this->belongsToMany(Quiz::class, 'user_quizzes','user_id', 'quiz_id');
43
    }
44
}
45