File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -158,6 +158,9 @@ builds their respective route objects and finally loads them into the Router. JS
158
158
159
159
160
160
``` php
161
+ use MinusFour\Router\RouteLoader\JsonRouteLoader;
162
+ //No need for Route or Action anymore so you can delete use directives.
163
+
161
164
$routeContainer = new TreeRouteContainer();
162
165
$routeLoader = new JsonRouteLoader(['routes.json'], __DIR__);
163
166
$routeLoader->loadRoutes($routeContainer);
@@ -187,7 +190,7 @@ This barely builds a path. It will fetch the route object and the path associate
187
190
188
191
``` php
189
192
//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' ));
191
194
// Parameter names must match the name of the elements given on the path. I.e. /name:(alex|john)/section:(home|news)
192
195
// name and section are both parameter names. Therefore, the supplied array can be:
193
196
// array('name' => 'alex', 'section' => 'home');
You can’t perform that action at this time.
0 commit comments