expectsJson()) { return route('admin.login'); } } else { if (!$request->expectsJson()) { return route('login'); } } } }