/**
  * Add the given route to the arrays of routes.
  *
  * @param  \Illuminate\Routing\Route  $route
  * @return void
  */
 protected function addToCollections($route)
 {
     foreach ($route->methods() as $method) {
         $this->routes[$method][$route->domain() . $route->getUri()] = $route;
     }
     $this->allRoutes[$method . $route->domain() . $route->getUri()] = $route;
 }
Beispiel #2
0
 /**
  * Get the route information for a given route.
  *
  * @param $route \Illuminate\Routing\Route
  * @param $filter string
  * @param $namespace string
  *
  * @return array
  */
 protected function getRouteInformation(Route $route, $filter, $namespace)
 {
     $host = $route->domain();
     $methods = $route->getMethods();
     $uri = $route->uri();
     $name = $route->getName();
     $action = $route->getActionName();
     $jsroute = array_get($route->getAction(), 'jsroute', null);
     if (!empty($namespace)) {
         $a = $route->getAction();
         if (isset($a['controller'])) {
             $action = str_replace($namespace . '\\', '', $action);
         }
     }
     switch ($filter) {
         case 'all':
             if ($jsroute === false) {
                 return null;
             }
             break;
         case 'only':
             if ($jsroute !== true) {
                 return null;
             }
             break;
     }
     return compact('host', 'methods', 'uri', 'name', 'action');
 }
 /**
  * Add the given route to the arrays of routes.
  *
  * @param  \Illuminate\Routing\Route $route
  * @return void
  */
 protected function addToCollections($route)
 {
     $domainAndUri = $route->domain() . $route->getUri() . $route->getPriority();
     foreach ($route->methods() as $method) {
         $this->routes[$method][$domainAndUri] = $route;
     }
     $this->allRoutes[$method . $domainAndUri] = $route;
 }
Beispiel #4
0
 /**
  * Get the formatted domain for a given route.
  *
  * @param  \Illuminate\Routing\Route  $route
  * @param  array  $parameters
  * @return string
  */
 protected function getRouteDomain($route, &$parameters)
 {
     return $route->domain() ? $this->formatDomain($route, $parameters) : null;
 }
Beispiel #5
0
 /**
  * Get the route information for a given route.
  *
  * @param  string  $name
  * @param  \Illuminate\Routing\Route  $route
  * @return array
  */
 protected function getRouteInformation(Route $route)
 {
     $uri = implode('|', $route->methods()) . ' ' . $route->uri();
     return $this->filterRoute(array('host' => $route->domain(), 'uri' => $uri, 'name' => $route->getName(), 'action' => $route->getActionName(), 'before' => $this->getBeforeFilters($route), 'after' => $this->getAfterFilters($route)));
 }
Beispiel #6
0
 /**
  * Get the route information for a given route.
  *
  * @param  string  $name
  * @param  \Symfony\Component\Routing\Route  $route
  * @return array
  */
 protected function getRouteInformation($name, Route $route)
 {
     $uri = head($route->methods()) . ' ' . $route->uri();
     return array('host' => (string) $route->domain(), 'method' => (string) $this->getMethod($uri), 'uri' => (string) $uri, 'name' => (string) $route->getName(), 'action' => (string) $route->getActionName(), 'before' => (string) $this->getBeforeFilters($route), 'after' => (string) $this->getAfterFilters($route));
 }
 /**
  * Get the route information for a given route.
  *
  * @param \Illuminate\Routing\Route $route        	
  * @return array
  */
 protected function getRouteInformation(Route $route)
 {
     return $this->filterRoute(['host' => $route->domain(), 'method' => implode('|', $route->methods()), 'uri' => $route->uri(), 'name' => $route->getName(), 'action' => $route->getActionName(), 'middleware' => $this->getMiddleware($route)]);
 }
Beispiel #8
0
 /**
  * Get the route information for a given route.
  *
  * @param \Illuminate\Routing\Route $route
  * @return array
  */
 protected function getRouteInformation(Route $route)
 {
     return $this->filterRoute(array('host' => $route->domain(), 'uri' => implode('|', $route->methods()) . ' ' . $route->uri(), 'name' => $route->getName(), 'action' => $route->getActionName(), 'version' => implode(', ', array_get($route->getAction(), 'version')), 'protected' => array_get($route->getAction(), 'protected') ? 'Yes' : 'No', 'scopes' => $this->getScopes($route)));
 }
Beispiel #9
0
 /**
  * Get the domain and schee for the route.
  *
  * @param  \Illuminate\Routing\Route  $route
  * @return string
  */
 protected function getDomainAndScheme($route)
 {
     return $this->getScheme($route->secure()) . $route->domain();
 }
Beispiel #10
0
 /**
  * Get the route information for a given route.
  *
  * @param  string  $name
  * @param  \Illuminate\Routing\Route  $route
  * @return array
  */
 protected function getRouteInformation(Route $route)
 {
     $uri = implode('|', $route->methods()) . ' ' . $route->uri();
     return $this->filterRoute(array('host' => $route->domain(), 'uri' => $uri, 'name' => $route->getName(), 'action' => $route->getActionName(), 'prefix' => $route->getPrefix(), 'method' => $route->methods()[0]));
 }
Beispiel #11
0
 /**
  * Get the route information for a given route.
  *
  * @param  \Illuminate\Routing\Route $route
  * @return array
  */
 protected function getRouteInformation(Route $route)
 {
     list($controller, $action) = explode("@", $route->getActionName());
     return ['host' => $route->domain(), 'method' => implode('|', $route->methods()), 'uri' => $route->uri(), 'name' => $route->getName(), 'controller' => $controller, 'action' => $action, 'resource' => $route->getActionName(), 'middleware' => Collection::make($this->getMiddleware($route))];
 }
Beispiel #12
0
 /**
  * @return array
  */
 public function toArray()
 {
     return array_merge(['name' => $this->route->getName(), 'methods' => $this->route->getMethods(), 'domain' => $this->route->domain(), 'path' => $this->preparePath(), 'action' => $this->route->getAction(), 'wheres' => $this->extractWheres(), 'errors' => $this->errors], $this->getMeta(), $this->options);
 }
 protected function getRouteInformation(Route $route, $current)
 {
     $uri = implode(' | ', $route->methods()) . ' <a href="' . $this->url->to($route->uri()) . '">' . $route->uri() . '</a>';
     return array('current' => $current == $route, 'host' => $route->domain(), 'uri' => $uri, 'name' => $route->getName(), 'action' => $route->getActionName(), 'before' => $this->getBeforeFilters($route), 'after' => $this->getAfterFilters($route));
 }