/** * Send a password reset token. * * @return \Illuminate\Http\JsonResponse */ public function sendReminder() { try { $this->users->requestPasswordResetForEmail($this->input('email')); return $this->success(['reminder email sent']); } catch (ReminderException $e) { return $this->error(['no user with that e-mail']); } }
/** * Send a password reset token. * * @return \Illuminate\Http\RedirectResponse */ public function sendReminder() { try { $this->users->requestPasswordResetForEmail($this->input('email')); return $this->redirect('login')->with('info', Lang::get('c::auth.resetpass-sent')); } catch (ReminderException $e) { if ($this->debug) { throw $e; } return $this->redirect('reminder')->with('error', Lang::get('c::auth.resetpass-failure')); } }