addRoute() protected method

Add a route to the underlying route collection.
protected addRoute ( array | string $methods, string $uri, Closure | array | string | null $action ) : Illuminate\Routing\Route
$methods array | string
$uri string
$action Closure | array | string | null
return Illuminate\Routing\Route
Example #1
0
 /**
  * Add a route to the underlying route collection.
  *
  * @param  array|string          $methods
  * @param  string                $uri
  * @param  \Closure|array|string $action
  *
  * @return \Illuminate\Routing\Route
  */
 protected function addRoute($methods, $uri, $action)
 {
     if (in_array('restful', array_flatten($this->groupStack))) {
         parent::addRoute($methods, $uri . $this->formatSuffix, $action);
     }
     return $this->routes->add($this->createRoute($methods, $uri, $action));
 }
Example #2
0
 /**
  * Add a route to the underlying route collection.
  *
  * @param  array|string          $methods
  * @param  string                $uri
  * @param  \Closure|array|string $action
  *
  * @return Route
  */
 protected function addRoute($methods, $uri, $action)
 {
     return parent::addRoute($methods, $uri, $action);
 }
 /**
  * Add a route to the underlying route collection.
  *
  * @param  array|string          $methods
  * @param  string                $uri
  * @param  \Closure|array|string $action
  *
  * @return \Illuminate\Routing\Route
  */
 protected function addRoute($methods, $uri, $action)
 {
     // Now we apply our Localization modifications.
     $uri = $this->localizeUris($uri);
     return parent::addRoute($methods, $uri, $action);
 }
Example #4
0
 /**
  * Add a route to the underlying route collection.
  *
  * @param  array|string  $methods
  * @param  string  $uri
  * @param  \Closure|array|string  $action
  * @return \Illuminate\Routing\Route
  */
 protected function addRoute($methods, $uri, $action)
 {
     $route = parent::addRoute($methods, $uri, $action);
     $this->adapterService->resetAdapter();
     return $route;
 }