Passed
Branch master (64a50e)
by Brian
02:57
created

Admin   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 9
c 0
b 0
f 0
dl 0
loc 39
ccs 4
cts 4
cp 1
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A sendPasswordResetNotification() 0 3 1
A sendEmailVerificationNotification() 0 3 1
1
<?php
2
3
namespace App\Models;
4
5
use App\Notifications\Admin\Auth\ResetPassword;
6
use App\Notifications\Admin\Auth\VerifyEmail;
7
use Illuminate\Contracts\Auth\MustVerifyEmail;
8
use Illuminate\Database\Eloquent\Factories\HasFactory;
9
use Illuminate\Foundation\Auth\User as Authenticatable;
10
use Illuminate\Notifications\Notifiable;
11
12
class Admin extends Authenticatable implements MustVerifyEmail
13
{
14
    use HasFactory;
15
    use Notifiable;
0 ignored issues
show
Bug introduced by
The trait Illuminate\Notifications\Notifiable requires the property $email which is not provided by App\Models\Admin.
Loading history...
16
17
    /**
18
     * The attributes that are mass assignable.
19
     *
20
     * @var array
21
     */
22
    protected $fillable = [
23
        'name', 'email', 'password',
24
    ];
25
26
    /**
27
     * The attributes that should be hidden for arrays.
28
     *
29
     * @var array
30
     */
31
    protected $hidden = [
32
        'password', 'remember_token',
33
    ];
34
35
    /**
36
     * Send the password reset notification.
37
     *
38
     * @param string $token
39
     */
40 1
    public function sendPasswordResetNotification($token)
41
    {
42 1
        $this->notify(new ResetPassword($token));
43
    }
44
45
    /**
46
     * Send the email verification notification.
47
     */
48 1
    public function sendEmailVerificationNotification()
49
    {
50 1
        $this->notify(new VerifyEmail());
51
    }
52
}
53