src/Valkyrja/Routing/NativeRouter.php
public function route(string $name): Route
    {
        // If no route was found
        if (! $this->routeIsset($name)) {
            throw new InvalidRouteName($name);
        }

        return self::$collection->namedRoute($name);
    }
public function route(string $name): Route
    {
        // If no route was found
        if (! $this->routeIsset($name)) {
            throw new InvalidRouteName($name);
        }

        return self::$collection->namedRoute($name);
    }
Get a route by name.

@param string $name The name of the route to get

@throws \Valkyrja\Routing\Exceptions\InvalidRouteName

@return \Valkyrja\Routing\Route