Seller::sendPasswordResetNotification()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace App\Modules\Sellers\Models;
4
5
use App\Modules\Sellers\Database\Factories\SellerFactory;
6
use App\Modules\Sellers\Notifications\Auth\ResetPassword;
7
use App\Modules\Sellers\Notifications\Auth\VerifyEmail;
8
use Illuminate\Contracts\Auth\MustVerifyEmail;
9
use Illuminate\Database\Eloquent\Factories\HasFactory;
10
use Illuminate\Foundation\Auth\User as Authenticatable;
11
use Illuminate\Notifications\Notifiable;
12
use Laravel\Sanctum\HasApiTokens;
13
14
class Seller extends Authenticatable implements MustVerifyEmail
15
{
16
    use HasApiTokens, HasFactory, Notifiable;
0 ignored issues
show
Bug introduced by
The trait Illuminate\Notifications\Notifiable requires the property $email which is not provided by App\Modules\Sellers\Models\Seller.
Loading history...
17
18
    /**
19
     * The attributes that are mass assignable.
20
     *
21
     * @var array<int, string>
22
     */
23
    protected $fillable = [
24
        'name',
25
        'email',
26
        'password',
27
    ];
28
29
    /**
30
     * The attributes that should be hidden for serialization.
31
     *
32
     * @var array<int, string>
33
     */
34
    protected $hidden = [
35
        'password',
36
        'remember_token',
37
    ];
38
39
    /**
40
     * The attributes that should be cast.
41
     *
42
     * @var array<string, string>
43
     */
44
    protected $casts = [
45
        'email_verified_at' => 'datetime',
46
    ];
47
48
    /**
49
     * Create a new factory instance for the model.
50
     *
51
     * @return \Illuminate\Database\Eloquent\Factories\Factory<static>
52
     */
53 22
    protected static function newFactory()
54
    {
55 22
        return SellerFactory::new();
56
    }
57
58
    /**
59
     * Send the password reset notification.
60
     *
61
     * @param  string  $token
62
     */
63 3
    public function sendPasswordResetNotification($token)
64
    {
65 3
        $this->notify(new ResetPassword($token));
66
    }
67
68
    /**
69
     * Send the email verification notification.
70
     */
71 2
    public function sendEmailVerificationNotification()
72
    {
73 2
        $this->notify(new VerifyEmail());
74
    }
75
}
76