Show the DNS history.

@param  Request  $request
@return \Illuminate\Http\Response
436148
public function show(Request $request)
    {
        $this->validate($request, [
            'domain' => 'required|string'
        ]);

        $dns = DNS::where('meta', $request->domain)->orderBy('created_at', 'desc')->get();

        if (! count($dns)) {
            return redirect(route('eyewitness.dashboard').'#dns')->withError('Sorry - we could not find any DNS history for that domain. If you have just added the record, you should wait for the first test to run (usaully within an hour).');
        }

        return view('eyewitness::dns.show')->withEye(app(Eye::class))
                                           ->withDomain($request->domain)
                                           ->withDns($dns);
    }
657744
public function index(Request $request)
    {
        $query = Tag::query();

        if ($request->has('filter.containing')) {
            $query->containing($request['filter']['containing']);
        }

        if ($request->has('filter.type')) {
            $query->where('type', $request['filter']['type']);
        }

        if ($request->has('limit')) {
            $query->limit($request['limit']);
        }

        return $query->get()->map(function (Tag $tag) {
            return $tag->name;
        });
    }
210959
public function index(Request $request)
    {
        $this->validate($request, ['category_id' => ['required']]);

        $threads = $this->model()
            ->withRequestScopes($request)
            ->where('category_id', $request->input('category_id'))
            ->get();

        return $this->response($threads);
    }
997926
public function index(Request $request)
    {
        $referrerDomain = parse_url($request->server('HTTP_REFERER'), PHP_URL_HOST);
        if ($referrerDomain !== $this->config->get('vanilla-integration.forum_domain')) {
            return app()->abort(404);
        }

        if (class_exists('Debugbar')) {
            \Debugbar::disable();
        }
        $clientID = $this->config->get('vanilla-integration.client_id');
        $secret   = $this->config->get('vanilla-integration.secret');

        $user = [];
        if ($this->auth->check()) {
            $currentUser      = $this->auth->user();
            $user['uniqueid'] = $currentUser->id;
            $user['name']     = $currentUser->getPresenter()->displayName();
            $user['email']    = $currentUser->email;
        }

        // Generate the jsConnect string.
        // This should be true unless you are testing.
        // You can also use a hash name like md5, sha1 etc which must be the name as the connection settings in Vanilla.
        $secure = true;
        WriteJsConnect($user, $request->only(['client_id', 'signature', 'callback', 'timestamp']), $clientID, $secret, $secure);
        return response('')->header('Content-Type', 'application/javascript');
    }
255038
public function show($request) {
        $this->resolveModel();
        $model = Dir::apiModel($this->model);

        if(empty($request->relationalModel))
            return $model::find($request->id);
        else {
            $modelRelational = trim(strtolower($request->relationalModel), 's');
            return $model::where([
                $model::EQUALS(
                    $modelRelational.'Id',
                    $request->idRelational
                ),
                $model::EQUALS(
                    'id',
                    $request->id
                )
            ]);
        }
    }
518765
public function renewUrl(Request $request)
    {
        $records = RecordsRequest::fromRequest($this->app, $request, !!$request->request->get('renew_children_url'));

        $renewed = [];
        foreach ($records as $record) {
            $renewed[$record->getId()] = (string) $record->get_preview()->renew_url();
        };

        return $this->app->json($renewed);
    }
560005
protected function search(Request $request)
    {
        $allResults = $this->repository->search($request->all());
        return Response::apiResponse([
            'data' => $allResults
        ]);
    }
997795
public function indexAction(Request $request)
    {
        $errorMessage = '';
        $hasDB = false;
        $installed = false;
        try {
            /** @var $page Page */
            $pageManager = $this->get('networking_init_cms.page_manager');
            $page = $pageManager->findOneBy(
                ['isHome' => 1, 'locale' => $request->getLocale()]
            );
            if (!$page) {
                throw new \Exception('Pages not loaded');
            }
            $url = $page->getFullPath();
            $label = 'Go to the homepage';
            $hasDB = true;
            $installed = true;
        } catch (\Exception $e) {
            $connection = $this->getDoctrine()->getConnection();
            try {
                $connection->connect();
                $hasDB = true;
            } catch (\Exception $e) {
                $errorMessage = $e->getMessage();
            }

            $url = $this->generateUrl('_install_db');
            $label = 'Install init cms';
        }

        return $this->render(
            '@NetworkingInitCms/InitCmsInstall/index.html.twig',
            [
                'action' => ['url' => $url, 'label' => $label],
                'title' => 'Welcome to the init cms',
                'has_DB' => $hasDB,
                'error_message' => $errorMessage,
                'installed' => $installed,
            ]
        );
    }
70978
public function index(Request $request)
    {
        $routePermissions = RoutePermission::browse([
            'order'     => [ Input::get('sort', 'id') => Input::get('direction', 'desc') ],
            'limit'     => ($limit = (int)Input::get('limit', 25)),
            'offset'    => (Input::get('page', 1) - 1) * $limit,
            'filters'   => $request->all()
        ]);

        return response()->json(arrayView('phpsoft.users::routePermission/browse', [
            'routePermissions' => $routePermissions,
        ]), 200);
    }
416704
public function resolve(Request $request)
    {
        //locale
        switch ($this->localePattern) {
            case self::PATTERN_DOMAIN:
                $locale = $this->resolveFromDomain($request);
                $request->setLocale($locale);
                break;
        }

        return $request->getLocale();
    }
867830
public function getRedirectFor(Request $request)
    {
        $redirects = $this->redirector->getRedirectsFor($request);

        collect($redirects)->each(function ($redirects, $missingUrl) {
            $this->router->get($missingUrl, function () use ($redirects, $missingUrl) {
                $redirectUrl = $this->determineRedirectUrl($redirects);
                $statusCode = $this->determineRedirectStatusCode($redirects);

                event(new RouteWasHit($redirectUrl, $missingUrl, $statusCode));

                return redirect()->to(
                    $redirectUrl,
                    $statusCode
                );
            });
        });

        try {
            return $this->router->dispatch($request);
        } catch (Exception $e) {
            event(new RedirectNotFound($request));

            return;
        }
    }
359115
public function validate(Request $request)
    {
        return ! \is_null($this->domain) && $request->getHost() === $this->getStrippedDomain();
    }
659244
public function indexAction(Request $request)
    {

        /** @var \Networking\InitCmsBundle\Lib\PhpCacheInterface $phpCache */
        $phpCache = $this->get('networking_init_cms.lib.php_cache');

        /** @var PageSnapshotInterface $page */
        $page = $request->get('_content');

        $template = $request->get('_template');
        if ($template instanceof \Sensio\Bundle\FrameworkExtraBundle\Configuration\Template) {
            $template = $template->getTemplate();
        }
        $user = $this->getUser();

        if ($phpCache->isCacheable($request, $user) && $page instanceof PageSnapshotInterface) {
            if (!$this->isSnapshotActive($page)) {
                throw new NotFoundHttpException();
            }

            if ($this->getSnapshotVisibility($page) != PageInterface::VISIBILITY_PUBLIC) {
                if (false === $this->get('security.authorization_checker')->isGranted('ROLE_USER')) {
                    throw new AccessDeniedException();
                }
            }

            $updatedAt = $phpCache->get(sprintf('page_%s_created_at', $page->getId()));
            $cacheKey = $request->getLocale().$request->getPathInfo();

            if ($updatedAt != $page->getSnapshotDate()) {
                $phpCache->delete($cacheKey);
            }

            $response = $phpCache->get($request->getLocale().$request->getPathInfo());

            if (!$response || !$response instanceof Response) {
                $params = $this->getPageParameters($request);

                if ($params instanceof RedirectResponse) {
                    return $params;
                }
                $html = $this->renderView(
                    $template,
                    $params
                );
                $response = new Response($html);

                $phpCache->set($cacheKey, $response);
                $phpCache->set(sprintf('page_%s_created_at', $page->getId()), $page->getSnapshotDate());
            } else {
                $phpCache->touch($cacheKey);
                $phpCache->touch(sprintf('page_%s_created_at', $page->getId()));
            }
        } else {
            $params = $this->getPageParameters($request);

            if ($params instanceof RedirectResponse) {
                return $params;
            }
            $html = $this->renderView(
                $template,
                $params
            );
            $response = new Response($html);
        }

        if ($this->getPageHelper()->isAllowLocaleCookie() && !$this->getPageHelper()->isSingleLanguage()) {
            $response->headers->setCookie(new Cookie('_locale', $request->getLocale()));
        }

        return $response;
    }
1133386
public function getActionAlias(Request $request): string
    {
        $actionAlias = str_replace('/', ':', $request->query->get('route'));

        if (empty($actionAlias)) {
            return $this->getConfiguration()->getDefaultController() . ':' . $this->getConfiguration()->getDefaultAction();
        }

        if (!strpos($actionAlias, ':')) {
            return $actionAlias . ':' . $this->getConfiguration()->getDefaultAction();
        }

        $aliases = array_keys($this->getQueryMap([]));

        foreach ($aliases as $alias) {
            if (strtolower($alias) === strtolower($actionAlias)) {
                $actionAlias = $alias;

                break;
            }
        }

        return $actionAlias;
    }
472507
public function index(Request $request)
    {
        $menu = Menu::defaultOrder()->get()->toTree();

        return $this->response()->collection($menu, new MenuTransformer());
    }
770079
private function getPageData(Request $request) {

        $publicDMQL = '(L_UpdateDate=' . date('Y-m-d', (strtotime('-1 day', time()))) . '-' . date('Y-m-d') . ')';

        $data = [
            "isPublic" => ExampleController::IS_PUBLIC,
            "disableCache" => !empty($request->disableCache),
            "keywords" => $request->keywords ? : ExampleController::EXAMPLE_ADDRESS,
            "extra" => $request->extra,
            "maxPrice" => $request->maxPrice,
            "minPrice" => $request->minPrice,
            "beds" => $request->beds,
            "baths" => $request->baths,
            "includeResidential" => $request->includeResidential,
            "includeLand" => $request->includeLand,
            "includeCommercial" => $request->includeCommercial,
            "sortBy" => $request->sortBy ? : "rawListPrice",
            "reverseSort" => !empty($request->reverseSort),
            // Only let the public search the last days worth of modified residential listings (to prevent abusive queries)
            "dmql" => (!empty($request->dmql) && !$data["isPublic"]) ? $request->dmql : $publicDMQL,
            "listings" => null,
            "detail" => null,
            "rawData" => null,
            "allInput" => $request->all(),
        ];

        if ($request->isMethod('POST')) {
            $this->handleAction($request, $data);
        }

        // Listing Details
        if ($request->has("source") && $request->has("type") && $request->has("id")) {
            $data["detail"] = $this->listingController($data)->details($request->source, $request->type, $request->id);
        }

        return $data;
    }
1001396
public function showAction(Request $request)
    {
        $schemaAlias = $request->attributes->get('schema');

        $this->isGrantedOr403($schemaAlias);

        $settings = $this->getSettingsManager()->load($schemaAlias);

        $view = $this
            ->view()
            ->setData($settings)
        ;

        return $this->handleView($view);
    }