src/Router.php
public function findByName($name)
	{
		return $this->routes->first(function ($route) use($name)
		{
			return $route->getName() === $name;
		});
	}
public function findByName($name)
	{
		return $this->routes->first(function ($route) use($name)
		{
			return $route->getName() === $name;
		});
	}
public function findByName ( $ name ) { return $ this -> routes -> first ( function ( $ route ) use ( $ name ) { return $ route -> getName ( ) === $ name ; } ) ; }
Returns route by given name

@param string $name
@return \PHPLegends\Routes\Route | null
Returns route by given name