File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ $routes = [
8282
8383// Add routes defined to route collector
8484$collector = $container->get(RouteCollectorInterface::class);
85- $collector->addRoute(Group::create(null)->routes( $routes) );
85+ $collector->addRoute(... $routes);
8686
8787// Initialize URL matcher
8888/** @var UrlMatcherInterface $urlMatcher */
@@ -216,12 +216,12 @@ $collector->addRoute(
216216 Group::create('/api')
217217 ->middleware(ApiAuthentication::class)
218218 ->host('https://example.com')
219- ->routes([
219+ ->routes(
220220 Route::get('/comments'),
221- Group::create('/posts')->routes([
221+ Group::create('/posts')->routes(
222222 Route::get('/list'),
223- ] ),
224- ] )
223+ ),
224+ )
225225);
226226```
227227
@@ -252,10 +252,9 @@ use \Tuupola\Middleware\CorsMiddleware;
252252return [
253253 Group::create('/api')
254254 ->withCors(CorsMiddleware::class)
255- ->routes([
255+ ->routes(
256256 // ...
257- ]
258- );
257+ );
259258];
260259```
261260
You can’t perform that action at this time.
0 commit comments