Skip to content

Commit 4d1da58

Browse files
committed
Fixed route configuration in micro kernel.
1 parent 4153d5e commit 4d1da58

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

configuration/micro_kernel_trait.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ Next, create an ``index.php`` file that defines the kernel class and executes it
5454

5555
protected function configureRoutes(RoutingConfigurator $routes)
5656
{
57-
// kernel is a service that points to this class
58-
// optional 3rd argument is the route name
59-
$routes->add('/random/{limit}', 'kernel::randomNumber');
57+
$routes->add('randomNumber', '/random/{limit}')->controller([$this, 'randomNumber']);
6058
}
6159

6260
public function randomNumber($limit)

0 commit comments

Comments
 (0)