getKey(); // TODO: Implement getJWTIdentifier() method. } public function getJWTCustomClaims() { return [ 'role' => 'user' ]; // TODO: Implement getJWTCustomClaims() method. } /** * 设置密码加密 * @param $value * @return string */ public function setPasswordAttribute($value) { $this->attributes['password'] = bcrypt($value); } }