Skip to content

Commit a203d45

Browse files
committed
Fix README.md
1 parent 1277776 commit a203d45

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,9 @@ builds their respective route objects and finally loads them into the Router. JS
158158

159159

160160
```php
161+
use MinusFour\Router\RouteLoader\JsonRouteLoader;
162+
//No need for Route or Action anymore so you can delete use directives.
163+
161164
$routeContainer = new TreeRouteContainer();
162165
$routeLoader = new JsonRouteLoader(['routes.json'], __DIR__);
163166
$routeLoader->loadRoutes($routeContainer);
@@ -187,7 +190,7 @@ This barely builds a path. It will fetch the route object and the path associate
187190

188191
```php
189192
//After the Router object has been instantiated with its respective TreeRouteContainer:
190-
$router->buildUrl('name_of_route', array('parameterName' => 'parameterValue));
193+
$router->buildUrl('name_of_route', array('parameterName' => 'parameterValue'));
191194
// Parameter names must match the name of the elements given on the path. I.e. /name:(alex|john)/section:(home|news)
192195
// name and section are both parameter names. Therefore, the supplied array can be:
193196
// array('name' => 'alex', 'section' => 'home');

0 commit comments

Comments
 (0)