Get the URL path for a route by providing a route name.

```
$set->pathFor('posts');
$set->pathFor('post', [id' => 15]);
$set->pathFor('root');
$set->pathFor('base');
```

@var string $name
352994
public function pathFor($name, $vars = [], array $options = [])
    {
        if ($name == 'base') {
            return $this->basePath;
        }
        
        foreach ($this->routes as $route) {
            $route->build();
            
            if ($route->name() == $name) {
                if ($path = $this->buildRouteUrl($route, $vars, $options)) {
                    return $path;
                }
            }
        }
        
        $routeParams = [];
        if (is_array($vars)) {
            $routeParams = array_merge($routeParams, $vars);
        } elseif ($vars instanceof Base) {
            $routeParams['record'] = get_class($vars);
            $routeParams['id'] = $vars->id();
        }
        
        $routeParams = implode(', ', array_map(function($name, $val) { return $name . '=>' . $val; }, array_keys($routeParams), $routeParams));
        $message = "Couldn't find route with name '%s' and options { %s }";
        throw new Exception\InvalidArgumentException(sprintf(
            $message,
            $name,
            $routeParams
        ));
    }
576485
public function getPath($name)
    {
        $segments = explode('\\', $name);

        array_shift($segments);

        return app_path(implode('/', $segments)).'.php';
    }
1127440
public static function getPathFromURL($url)
	{
		$path = str_replace(self::getProtocolFromURL($url) . '://', '', $url);
		$path = str_replace(self::getDomainFromURL($url), '', $path);
		
		if($path == '') return '/';
		
		return $path;
	}
138732
public function getUrlByRoutePath($route_path)
    {
        if (null === $url = $this->getRouteCollection()->getRoutePath($route_path)) {
            $url = '/';
        }

        return $url;
    }
1328592
public function path()
    {
        $pos = strpos($_SERVER['REQUEST_URI'], '?');

        if ($pos) {
            $uri = substr($_SERVER['REQUEST_URI'], 0, $pos);
        } else {
            $uri = $_SERVER['REQUEST_URI'];
        }

        return $uri;
    }
1032533
public function getRouteByAlias($name)
    {
        $aliases = $this->getAliases();

        return isset($aliases[$name]) ? $aliases[$name] : NULL;
    }
88818
protected function getPath($name)
    {   
        $rootNamespace = $this->getLaravelRootNamespace();

        $name = str_replace_first($rootNamespace, '', $name);
        
        return $this->laravel['path'] . '/' . str_replace('\\', '/', $name) . '.php';
    }
581114
function get_slug( $name = null ) {

        // If no name set use the post type name.
        if ( ! isset( $name ) ) {

            $name = $this->post_type_name;
        }

        // Name to lower case.
        $name = strtolower( $name );

        // Replace spaces with hyphen.
        $name = str_replace( " ", "-", $name );

        // Replace underscore with hyphen.
        $name = str_replace( "_", "-", $name );

        return $name;
    }
299465
public function name($name){
        return isset($this->routes[$name]) ? $this->routes[$name] : false;
    }
150769
public function getRouteName()
    {
        $route = $this->getEntities();

        if ($this->console->option('prefix')) {
            $route = strtolower($this->getPrefix('/')).$route;
        }

        return $route;
    }
671875
public function getRouteName($name)
    {
        $sectionPrefix = $this->getSection() ? $this->getSection() . '_' : '';

        return sprintf('%s_%s%s_%s', $this->metadata->getApplicationName(), $sectionPrefix, $this->metadata->getName(), $name);
    }
171898
public function getRoute($name, array $args = [])
    {
        if (!isset($this->names[$name])) {
            return null;
        }

        $route = $this->callbacks[$this->names[$name]];

        if (strpos($route->pattern, '(') === false) {
            // If we don't have any route parameters, just return the pattern
            // straight off. No need for any regex stuff.
            return $route->pattern;
        }

        // Convert all placeholders to %o = optional and %r = required
        $from    = ['/(\([^\/]+[\)]+[\?])/', '/(\([^\/]+\))/'];
        $to      = ['%o', '%r'];
        $pattern = preg_replace($from, $to, $route->pattern);

        $frags = explode('/', trim($pattern, '/'));
        $url   = [];

        // Loop thru the pattern fragments and insert the arguments
        foreach ($frags as $frag) {
            if ($frag == '%r') {
                if (!$args) {
                    // A required parameter, but no more arguments.
                    throw new Exception('Missing route parameters');
                }
                $url[] = array_shift($args);
                continue;
            }

            if ($frag == "%o") {
                if (!$args) {
                    // No argument for the optional parameter,
                    // just continue the iteration.
                    continue;
                }
                $url[] = array_shift($args);
                continue;
            }

            $url[] = $frag;
        }

        return '/' . implode('/', $url);
    }
386480
public function getConfFilePath($name)
    {
        ($this->apache_base_path != null) ? $apache_base_path = $this->getPath($this->apache_base_path) :
            $apache_base_path = $this->getPath("/etc/apache2/");

        $suffix = "";
        if ($this->apache_version === "24") {
            $suffix = '/conf-available/' . $name . '.conf';
        } else {
            $suffix = '/conf.d/' . $name . '.conf';
        }

        return $apache_base_path . $suffix;

    }
297085
protected function getPath($name)
    {
        $name = str_replace_first($this->getPackageNamespace(), '', $name);
        $this->checkDestination();
        return base_path() . $this->getDestination() . '/'.str_replace('\\', '/', $name).'.php';
    }
160220
static public function getRoute($name) {
        $route_by_name = isset(self::$_stored_names[$name]) ?
            self::$_stored_names[$name] :
            null;
        
        if (!is_null($route_by_name) && isset(self::$_stored_routes[$route_by_name])) {
            return self::$_stored_routes[$route_by_name];
        }

        return null;
    }
731858
public function prefixRoute($name)
    {
        $prefix = $this->config('route.name-prefix');

        return starts_with($name, $prefix) ? $name : $prefix . $name;
    }
1199644
protected function getPath($name)
    {
        $name = Str::replaceFirst($this->rootNamespace(), '', $name);

        return $this->laravel['path'].'/'.str_replace('\\', '/', $name).'.php';
    }