src/Routing/RouteGroup.php
/**
	 * Gets the group's middleware if it has any set, including parent groups' middleware. If the $existing parameter
	 * is supplied, the middleware arrays are joined with duplicates removed.
	 *
	 * @param array $existing
	 * @return array
	 */
Gets the group's middleware if it has any set, including parent groups' middleware. If the $existing parameter
is supplied, the middleware arrays are joined with duplicates removed.

@param array $existing
@return array
Gets the group ' s middleware if it has any set including parent groups ' middleware . If the $existing parameter is supplied the middleware arrays are joined with duplicates removed . @param array $existing @return array
public function middleware($existing = array()) {
		$parentMiddleware = $this->parent ? $this->parent->middleware() : array();
		$thisMiddleware = $this->property('middleware', array());
		foreach ($parentMiddleware as $middleware) {
			if (!in_array($middleware, $existing)) {
				$existing[] = $middleware;
			}
		}
		foreach ($thisMiddleware as $middleware) {
			if (!in_array($middleware, $existing)) {
				$existing[] = $middleware;
			}
		}
		return $existing;
	}
public function middleware ( $ existing = array ( ) ) { $ parentMiddleware = $ this -> parent ? $ this -> parent -> middleware ( ) : array ( ) ; $ thisMiddleware = $ this -> property ( 'middleware' , array ( ) ) ; foreach ( $ parentMiddleware as $ middleware ) { if ( ! in_array ( $ middleware , $ existing ) ) { $ existing [ ] = $ middleware ; } } foreach ( $ thisMiddleware as $ middleware ) { if ( ! in_array ( $ middleware , $ existing ) ) { $ existing [ ] = $ middleware ; } } return $ existing ; }
Gets the group's middleware if it has any set, including parent groups' middleware.
Gets the group ' s middleware if it has any set including parent groups ' middleware .
// Add parent middleware // Add self middleware