'success', 'message' => 'The password reset link was send succesfully', ]; if (is_demo()) { return response()->json($message); } // Get password token $token = Password::getRepository() ->create($user); // Send user email $user->sendPasswordResetNotification($token); return response()->json($message); } }