-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathUser.php
52 lines (44 loc) · 1.36 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
<?php
namespace App\Models\Auth;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
use App\Mutators\UserMutator;
use Silber\Bouncer\Database\HasRolesAndAbilities;
use Tymon\JWTAuth\Contracts\JWTSubject as AuthenticatableUserContract;
use App\Notifications\PasswordResetNotification;
class User extends Authenticatable implements AuthenticatableUserContract
{
use Notifiable, UserMutator, HasRolesAndAbilities;
protected $table = 'users';
public $incrementing = false;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'first_name', 'last_name', 'email', 'username', 'password'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
'password', 'remember_token'
];
protected $casts = [
'verified' => 'boolean',
'activated' => 'boolean',
'banned' => 'boolean',
'on_trial' => 'boolean',
'subscribed' => 'boolean',
'settings' => 'array'
];
protected $dates = ['deleted_at', 'created_at', 'updated_at'];
// Override the Built In PasswordResetNotification by Laravel
public function sendPasswordResetNotification($token)
{
$this->notify(new PasswordResetNotification($token));
}
}