new LogicException("[$name] middleware group is referencing itself.")); $results = array_merge($results, static::parseMiddlewareGroup( $middleware, $map, $middlewareGroups )); continue; } [$middleware, $parameters] = array_pad( explode(':', $middleware, 2), 2, null ); // If this middleware is actually a route middleware, we will extract the full // class name out of the middleware list now. Then we'll add the parameters // back onto this class' name so the pipeline will properly extract them. if (isset($map[$middleware])) { $middleware = $map[$middleware]; } $results[] = $middleware.($parameters ? ':'.$parameters : ''); } return $results; } }