2019-05-20 07:37:41 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App;
|
|
|
|
|
2020-03-06 15:07:09 +01:00
|
|
|
use Illuminate\Auth\Notifications\ResetPassword;
|
2019-05-20 07:37:41 +02:00
|
|
|
use Illuminate\Notifications\Notifiable;
|
|
|
|
use Illuminate\Contracts\Auth\MustVerifyEmail;
|
|
|
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
|
|
|
use Laravel\Passport\HasApiTokens;
|
|
|
|
|
|
|
|
class User extends Authenticatable
|
|
|
|
{
|
2020-01-14 11:08:21 +01:00
|
|
|
use HasApiTokens, Notifiable;
|
2019-05-20 07:37:41 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The attributes that are mass assignable.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $fillable = [
|
|
|
|
'name', 'email', 'password',
|
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The attributes that should be hidden for arrays.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $hidden = [
|
|
|
|
'password', 'remember_token',
|
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The attributes that should be cast to native types.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $casts = [
|
|
|
|
'email_verified_at' => 'datetime',
|
|
|
|
];
|
2020-01-14 23:43:17 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Send the password reset notification.
|
|
|
|
*
|
|
|
|
* @param string $token
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function sendPasswordResetNotification($token)
|
|
|
|
{
|
|
|
|
$this->notify(new ResetPassword($token));
|
|
|
|
}
|
2019-05-20 07:37:41 +02:00
|
|
|
}
|