public function postRemind(Request $request) { $this->validate($request, ['email' => 'required|email']); if (User::whereEmail($request->input('email'))->noPassword()->first()) { // Notify the user if he/she is a social login user. $message = sprintf("%s %s", trans('auth.social_olny'), trans('auth.no_password')); return $this->respondError($message, 400); } $response = Password::sendResetLink($request->only('email'), function ($m) { $m->subject(trans('auth.email_password_reset_title')); }); switch ($response) { case Password::RESET_LINK_SENT: return $this->respondSuccess(trans($response)); case Password::INVALID_USER: return $this->respondError(trans($response), 404); } }