Skip to content

Commit

Permalink
Merge branch '5.x' of github.com:thephpleague/route into 5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
philipobenito committed Sep 28, 2024
2 parents 05046bf + 369d39f commit 2664e0f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/5.x/dependency-injection.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,9 @@ $container = new League\Container\Container;
$container->add(Acme\SomeController::class)->addArgument(Acme\TemplateRenderer::class);
$container->add(Acme\TemplateRenderer::class);

$strategy = (new League\Route\Strategy\ApplicationStrategy)->setContainer($container);
$router = (new League\Route\Router)->setStrategy($strategy);
$strategy = new League\Route\Strategy\ApplicationStrategy;
$strategy->setContainer($container);
$router = (new League\Route\Router)->setStrategy($strategy);

$router->map('GET', '/', Acme\SomeController::class);
~~~

0 comments on commit 2664e0f

Please sign in to comment.