src/Routing/RouteGroup.php
/**
	 * Adds a middleware to the route group. This does not modify the prefix of routes already added to the group, but
	 * will affect routes added afterwards.
	 *
	 * @param string[] $middleware
	 */
Adds a middleware to the route group. This does not modify the prefix of routes already added to the group, but
will affect routes added afterwards.

@param string[] $middleware
Adds a middleware to the route group . This does not modify the prefix of routes already added to the group but will affect routes added afterwards . @param string [] $middleware
public function addMiddleware(array $middleware) {
		if (!isset($this->properties['middleware'])) {
			$this->properties['middleware'] = array();
		}
		foreach ($middleware as $name) {
			if (in_array($name, $this->properties['middleware'])) continue;
			$this->properties['middleware'][] = $name;
		}
	}
public function addMiddleware ( array $ middleware ) { if ( ! isset ( $ this -> properties [ 'middleware' ] ) ) { $ this -> properties [ 'middleware' ] = array ( ) ; } foreach ( $ middleware as $ name ) { if ( in_array ( $ name , $ this -> properties [ 'middleware' ] ) ) continue ; $ this -> properties [ 'middleware' ] [ ] = $ name ; } }
Adds a middleware to the route group.
Adds a middleware to the route group .