Recca0120\LaravelTracy\Panels\RoutingPanel::getAttributes PHP Method

getAttributes() protected method

getAttributes.
protected getAttributes ( ) : array
return array
    protected function getAttributes()
    {
        $data = ['uri' => 404, 'action' => []];
        if ($this->isLaravel() === true) {
            $router = $this->laravel['router'];
            $currentRoute = $router->getCurrentRoute();
            if ($currentRoute !== null) {
                $data = ['uri' => $currentRoute->uri(), 'action' => $currentRoute->getAction()];
            }
        } else {
            if (empty($_SERVER['HTTP_HOST'])) {
                return ['uri' => '404', 'action' => []];
            }
            $http_host = Arr::get($_SERVER, 'HTTP_HOST');
            $requestUri = Arr::get($_SERVER, 'REQUEST_URI');
            $data = ['uri' => $requestUri, 'action' => []];
        }
        return $data;
    }
RoutingPanel