Illuminate\Routing\Router::substituteBindings PHP Method

substituteBindings() public method

Substitute the route bindings onto the route.
public substituteBindings ( Illuminate\Routing\Route $route ) : Illuminate\Routing\Route
$route Illuminate\Routing\Route
return Illuminate\Routing\Route
    public function substituteBindings($route)
    {
        foreach ($route->parameters() as $key => $value) {
            if (isset($this->binders[$key])) {
                $route->setParameter($key, $this->performBinding($key, $value, $route));
            }
        }
        return $route;
    }

Usage Example

Example #1
0
 /**
  * Substitute the route bindings onto the route.
  *
  * @param \Illuminate\Routing\Route $route
  *
  * @return \Illuminate\Routing\Route
  * @static
  */
 public static function substituteBindings($route)
 {
     return \Illuminate\Routing\Router::substituteBindings($route);
 }