middleware('guest'); } /** * Validate the email for the given request. * * @param \Illuminate\Http\Request $request * @return void */ protected function validateEmail(Request $request) { $request->validate(['email' => 'required|exists:users,email']); } /** * Get the response for a successful password reset link. * * @param \Illuminate\Http\Request $request * @param string $response * @return \Illuminate\Http\RedirectResponse */ protected function sendResetLinkResponse(Request $request, $response) { return ['status' => trans($response)]; // return response()->json(['status' => $response], 200); } /** * Get the response for a failed password reset link. * * @param \Illuminate\Http\Request $request * @param string $response * @return \Illuminate\Http\RedirectResponse */ protected function sendResetLinkFailedResponse(Request $request, $response) { return response()->json(['email' => trans($response)], 400); } }