1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- namespace App;
- use Illuminate\Contracts\Auth\MustVerifyEmail;
- use Illuminate\Notifications\Notifiable;
- use Illuminate\Foundation\Auth\User as Authenticatable;
- use Tymon\JWTAuth\Contracts\JWTSubject;
- use Illuminate\Database\Eloquent\SoftDeletes;
- use Spatie\Permission\Traits\HasRoles;
- class User extends Authenticatable implements JWTSubject
- {
- use Notifiable, HasRoles, SoftDeletes;
- /**
- * The attributes that are mass assignable.
- *
- * @var array
- */
- protected $fillable = [
- 'name',
- 'email',
- 'photo',
- 'type',
- 'password',
- 'position',
- 'phone',
- 'hire_date',
- 'is_active',
- ];
- /**
- * The attributes that should be hidden for arrays.
- *
- * @var array
- */
- protected $hidden = [
- 'password', 'remember_token',
- ];
- protected $dates = ['deleted_at'];
- public function getJWTIdentifier()
- {
- return $this->getKey();
- }
- public function getJWTCustomClaims()
- {
- return [];
- }
- }
|