public static function getRouteByName(string $name) : Route
    {
        foreach (static::$routes as $routes) {
            /** @var Route $route */
            foreach ($routes as $route) {
                if ($route->getName() === $name) {
                    return $route;
                }
            }
        }

        return null;
    }
public static function getRouteByName(string $name) : Route
    {
        foreach (static::$routes as $routes) {
            /** @var Route $route */
            foreach ($routes as $route) {
                if ($route->getName() === $name) {
                    return $route;
                }
            }
        }

        return null;
    }
public static function getRouteByName ( string $ name ) : Route { foreach ( static :: $ routes as $ routes ) { /** @var Route $route */ foreach ( $ routes as $ route ) { if ( $ route -> getName ( ) === $ name ) { return $ route ; } } } return null ; }
Tries to fetch a route by name, returns null if it doesn't exist
@param string $name
@return null|Route
@since 1.0.0
Tries to fetch a route by name returns null if it doesn t exist