protected function getRouteUrlWithBindings($route)
	{
		$urlRouteBindings = [];
		$urlInjectedBindings = [];

		$routeAction = $route->getAction();
		if (isset($routeAction['as'])) {
			if (isset($this->profile['api_calls_bindings'])) {
				foreach ($this->profile['api_calls_bindings'] as $apiCallsBinding) {
					$routesAliases = $apiCallsBinding['routes_aliases'];
					foreach ($routesAliases as $routeAlias) {
						if ($routeAlias == $routeAction['as']) {
							foreach ($apiCallsBinding['bindings'] as $binding) {
								if ($binding['in'] == 'query-route') {
									$urlRouteBindings[$binding['name']] = $binding['value'];
								} else if ($binding['in'] == 'query-injected') {
									$urlInjectedBindings[$binding['name']] = $binding['value'];
								}
							}
						}
					}
				}
			}
		}

		$url = $this->getRouteUri($route);

		foreach ($urlRouteBindings as $name => $value) {
			$url = str_replace('{'.$name.'}', $value, $url);
		}

		if (count($urlInjectedBindings) > 0) {
			$firstName = array_keys($urlInjectedBindings)[0];
			$firstValue = array_shift($urlInjectedBindings);
			$url .= '?' . $firstName . '=' . $firstValue;
			foreach ($urlInjectedBindings as $name => $value) {
				$url .= '&' . $name . '=' . $value;
			}
		}

		return $url;
	}
protected function getRouteUrlWithBindings($route)
	{
		$urlRouteBindings = [];
		$urlInjectedBindings = [];

		$routeAction = $route->getAction();
		if (isset($routeAction['as'])) {
			if (isset($this->profile['api_calls_bindings'])) {
				foreach ($this->profile['api_calls_bindings'] as $apiCallsBinding) {
					$routesAliases = $apiCallsBinding['routes_aliases'];
					foreach ($routesAliases as $routeAlias) {
						if ($routeAlias == $routeAction['as']) {
							foreach ($apiCallsBinding['bindings'] as $binding) {
								if ($binding['in'] == 'query-route') {
									$urlRouteBindings[$binding['name']] = $binding['value'];
								} else if ($binding['in'] == 'query-injected') {
									$urlInjectedBindings[$binding['name']] = $binding['value'];
								}
							}
						}
					}
				}
			}
		}

		$url = $this->getRouteUri($route);

		foreach ($urlRouteBindings as $name => $value) {
			$url = str_replace('{'.$name.'}', $value, $url);
		}

		if (count($urlInjectedBindings) > 0) {
			$firstName = array_keys($urlInjectedBindings)[0];
			$firstValue = array_shift($urlInjectedBindings);
			$url .= '?' . $firstName . '=' . $firstValue;
			foreach ($urlInjectedBindings as $name => $value) {
				$url .= '&' . $name . '=' . $value;
			}
		}

		return $url;
	}
protected function getRouteUrlWithBindings ( $ route ) { $ urlRouteBindings = [ ] ; $ urlInjectedBindings = [ ] ; $ routeAction = $ route -> getAction ( ) ; if ( isset ( $ routeAction [ 'as' ] ) ) { if ( isset ( $ this -> profile [ 'api_calls_bindings' ] ) ) { foreach ( $ this -> profile [ 'api_calls_bindings' ] as $ apiCallsBinding ) { $ routesAliases = $ apiCallsBinding [ 'routes_aliases' ] ; foreach ( $ routesAliases as $ routeAlias ) { if ( $ routeAlias == $ routeAction [ 'as' ] ) { foreach ( $ apiCallsBinding [ 'bindings' ] as $ binding ) { if ( $ binding [ 'in' ] == 'query-route' ) { $ urlRouteBindings [ $ binding [ 'name' ] ] = $ binding [ 'value' ] ; } else if ( $ binding [ 'in' ] == 'query-injected' ) { $ urlInjectedBindings [ $ binding [ 'name' ] ] = $ binding [ 'value' ] ; } } } } } } } $ url = $ this -> getRouteUri ( $ route ) ; foreach ( $ urlRouteBindings as $ name => $ value ) { $ url = str_replace ( '{' . $ name . '}' , $ value , $ url ) ; } if ( count ( $ urlInjectedBindings ) > 0 ) { $ firstName = array_keys ( $ urlInjectedBindings ) [ 0 ] ; $ firstValue = array_shift ( $ urlInjectedBindings ) ; $ url .= '?' . $ firstName . '=' . $ firstValue ; foreach ( $ urlInjectedBindings as $ name => $ value ) { $ url .= '&' . $ name . '=' . $ value ; } } return $ url ; }
Return the route url to call with bindings from configuration files.

@param $route
@return string
Return the route url to call with bindings from configuration files .