public static function add($path, $options = null, $prepend = false, $case_sensitive = null)
	{
		if (is_array($path))
		{
			// Reverse to keep correct order in prepending
			$prepend and $path = array_reverse($path, true);
			foreach ($path as $p => $t)
			{
				static::add($p, $t, $prepend);
			}
			return;
		}
		elseif ($options instanceof Route)
		{
			static::$routes[$path] = $options;
			return;
		}

		$name = $path;
		if (is_array($options) and array_key_exists('name', $options))
		{
			$name = $options['name'];
			unset($options['name']);
			if (count($options) == 1 and ! is_array($options[0]))
			{
				$options = $options[0];
			}
		}

		if ($prepend)
		{
			\Arr::prepend(static::$routes, $name, new \Route($path, $options, $case_sensitive, $name));
			return;
		}

		static::$routes[$name] = new \Route($path, $options, $case_sensitive, $name);
	}
public static function add($path, $options = null, $prepend = false, $case_sensitive = null)
	{
		if (is_array($path))
		{
			// Reverse to keep correct order in prepending
			$prepend and $path = array_reverse($path, true);
			foreach ($path as $p => $t)
			{
				static::add($p, $t, $prepend);
			}
			return;
		}
		elseif ($options instanceof Route)
		{
			static::$routes[$path] = $options;
			return;
		}

		$name = $path;
		if (is_array($options) and array_key_exists('name', $options))
		{
			$name = $options['name'];
			unset($options['name']);
			if (count($options) == 1 and ! is_array($options[0]))
			{
				$options = $options[0];
			}
		}

		if ($prepend)
		{
			\Arr::prepend(static::$routes, $name, new \Route($path, $options, $case_sensitive, $name));
			return;
		}

		static::$routes[$name] = new \Route($path, $options, $case_sensitive, $name);
	}
public static function add ( $ path , $ options = null , $ prepend = false , $ case_sensitive = null ) { if ( is_array ( $ path ) ) { // Reverse to keep correct order in prepending $ prepend and $ path = array_reverse ( $ path , true ) ; foreach ( $ path as $ p => $ t ) { static :: add ( $ p , $ t , $ prepend ) ; } return ; } elseif ( $ options instanceof Route ) { static :: $ routes [ $ path ] = $ options ; return ; } $ name = $ path ; if ( is_array ( $ options ) and array_key_exists ( 'name' , $ options ) ) { $ name = $ options [ 'name' ] ; unset ( $ options [ 'name' ] ) ; if ( count ( $ options ) == 1 and ! is_array ( $ options [ 0 ] ) ) { $ options = $ options [ 0 ] ; } } if ( $ prepend ) { \ Arr :: prepend ( static :: $ routes , $ name , new \ Route ( $ path , $ options , $ case_sensitive , $ name ) ) ; return ; } static :: $ routes [ $ name ] = new \ Route ( $ path , $ options , $ case_sensitive , $ name ) ; }
Add one or multiple routes

@param  string
@param  string|array|Route  either the translation for $path, an array for verb routing or an instance of Route
@param  bool                whether to prepend the route(s) to the routes array
Add one or multiple routes