Beispiel #1
0
 /**
  * Add the necessary where clauses to the route based on its initial registration.
  *
  * @param  \Illuminate\Routing\Route  $route
  * @return \Illuminate\Routing\Route
  */
 protected function addWhereClausesToRoute($route)
 {
     $where = isset($route->getAction()['where']) ? $route->getAction()['where'] : [];
     $route->where(array_merge($this->patterns, $where));
     return $route;
 }
Beispiel #2
0
 /**
  * @param Router $route
  *
  * @return $this
  */
 protected function addResponseType(Router $route)
 {
     return $route->where('type', '\\.[a-z]+');
 }
 /**
  * Add the necessary where clauses to the route based on its initial registration.
  *
  * @param  \Illuminate\Routing\Route  $route
  * @return \Illuminate\Routing\Route
  */
 protected function addWhereClausesToRoute($route)
 {
     $route->where(array_merge($this->patterns, array_get($route->getAction(), 'where', [])));
     return $route;
 }
Beispiel #4
0
 /**
  * Add a route to the appropriate route collection.
  *
  * @param array  $methods
  * @param array  $versions
  * @param string $uri
  * @param mixed  $action
  *
  * @return \Illuminate\Routing\Route
  */
 public function addRoute(array $methods, array $versions, $uri, $action)
 {
     $this->createRouteCollections($versions);
     $route = new Route($methods, $uri, $action);
     $route->where($action['where']);
     foreach ($versions as $version) {
         $this->routes[$version]->add($route);
     }
     return $route;
 }