public function findRouteByTag($tag)
    {
        $route = $this->each(function(Route $route) use($tag)
        {
            if($route->hasProperty('tag') && $route->getProperty('tag') == $tag)
                return $route;
        }, true);

        return $route ? : null;
    }
public function findRouteByTag($tag)
    {
        $route = $this->each(function(Route $route) use($tag)
        {
            if($route->hasProperty('tag') && $route->getProperty('tag') == $tag)
                return $route;
        }, true);

        return $route ? : null;
    }
public function findRouteByTag ( $ tag ) { $ route = $ this -> each ( function ( Route $ route ) use ( $ tag ) { if ( $ route -> hasProperty ( 'tag' ) && $ route -> getProperty ( 'tag' ) == $ tag ) return $ route ; } , true ) ; return $ route ? : null ; }
Find route by given tag

@param string $tag
@return Route|null
Find route by given tag