2019-11-30 18:19:13 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
|
|
|
use Tymon\JWTAuth\Contracts\JWTSubject;
|
|
|
|
|
|
|
|
class User extends Authenticatable implements JWTSubject
|
|
|
|
{
|
2019-11-30 18:50:57 +01:00
|
|
|
|
|
|
|
protected $fillable = [
|
2019-11-30 18:19:13 +01:00
|
|
|
'email', 'password', 'role'
|
|
|
|
];
|
|
|
|
|
2019-11-30 18:54:49 +01:00
|
|
|
protected $hidden = [
|
2019-11-30 18:19:13 +01:00
|
|
|
'password', 'created_at', 'updated_at'
|
|
|
|
];
|
|
|
|
|
|
|
|
public function getJWTIdentifier()
|
|
|
|
{
|
|
|
|
return $this->getKey();
|
|
|
|
}
|
2019-11-30 18:50:57 +01:00
|
|
|
|
2019-11-30 18:19:13 +01:00
|
|
|
public function getJWTCustomClaims()
|
|
|
|
{
|
|
|
|
return [];
|
|
|
|
}
|
|
|
|
}
|