-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathUser.php
61 lines (49 loc) · 1.13 KB
/
User.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
namespace App;
use App\Notifications\AccountVerify;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Laravel\Passport\HasApiTokens;
class User extends Authenticatable {
use HasApiTokens, Notifiable, SoftDeletes;
protected $dates = ['deleted_at'];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name', 'email', 'password', 'phonenumber', 'token', 'active',
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
'password', 'remember_token', 'token',
];
/**
* The attributes that should be cast to native types.
*
* @var array
*/
protected $casts = [
'email_verified_at' => 'datetime',
];
public function products() {
return $this->hasMany(Product::class);
}
/**
*
* Kullanıcı Doğrulama İçin Çalışan Notification
*
*/
public function sendApiConfirmAccount() {
$this->notify(new AccountVerify);
}
public function resendApiConfirmAccount() {
$this->notify(new AccountVerifyUser);
}
}