getKey(); } /** * Return a key value array, containing any custom claims to be added to the JWT. * * @return array */ public function getJWTCustomClaims() { return []; } protected $table = 'admins'; /** * The attributes that are mass assignable. * * @var array */ protected $fillable = [ 'name', 'password' ]; /** * The attributes that should be hidden for arrays. * * @var array */ protected $hidden = [ 'password' ]; //将密码进行加密 public function setPasswordAttribute($value) { $this->attributes['password'] = bcrypt($value); } }