validated('email'); $is_email = User::where('email', $email)->exists(); if (!$is_email) return ResponseJsonMessage::withError( 'Esse e-mail não existe no nosso sistema', Response::HTTP_BAD_REQUEST ); DB::table('password_resets')->where('email', $email)->delete(); $token = random_int(100000, 999999); DB::table('password_resets')->insert([ 'email' => $email, 'token' => $token, 'created_at' => Carbon::now() ]); Mail::to($email)->send(new ResetPassword($token)); return ResponseJsonMessage::withMessage("Verifique seu e-mail"); } public function verifyPin(Request $request) { } }