protected function replaceRouteParameters($route, &$parameters = [])
    {
        return \preg_replace_callback('/\{(.*?)(:.*?)?(\{[0-9,]+\})?\}/', function ($m) use (&$parameters) {
            return isset($parameters[$m[1]]) ? Arr::pull($parameters, $m[1]) : $m[0];
        }, $route);
    }
protected function replaceRouteParameters($route, &$parameters = [])
    {
        return \preg_replace_callback('/\{(.*?)(:.*?)?(\{[0-9,]+\})?\}/', function ($m) use (&$parameters) {
            return isset($parameters[$m[1]]) ? Arr::pull($parameters, $m[1]) : $m[0];
        }, $route);
    }
protected function replaceRouteParameters ( $ route , & $ parameters = [ ] ) { return \ preg_replace_callback ( '/\{(.*?)(:.*?)?(\{[0-9,]+\})?\}/' , function ( $ m ) use ( & $ parameters ) { return isset ( $ parameters [ $ m [ 1 ] ] ) ? Arr :: pull ( $ parameters , $ m [ 1 ] ) : $ m [ 0 ] ; } , $ route ) ; }
Replace the route parameters with their parameter.

@param  string  $route
@param  array $parameters

@return string
Replace the route parameters with their parameter .