/** * @param $input * @return mixed * @throws GeneralException */ public function changePassword($input) { $user = parent::find(access()->id()); if (Hash::check($input['old_password'], $user->password)) { $user->password = bcrypt($input['password']); return parent::save($user); } throw new GeneralException(trans('exceptions.frontend.auth.password.change_mismatch')); }