Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions configuration/micro_kernel_trait.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ Next, create an ``index.php`` file that creates a kernel class and executes it::

protected function configureRoutes(RouteCollectionBuilder $routes)
{
// kernel is a service that points to this class
// optional 3rd argument is the route name
$routes->add('/random/{limit}', 'kernel:randomAction');
$routes->add('random_number', '/random/{limit}')->controller([$this, 'randomNumber']);
}

public function randomAction($limit)
Expand Down Expand Up @@ -159,7 +157,7 @@ hold the kernel. Now it looks like this::
];

if ($this->getEnvironment() == 'dev') {
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
$bundles[] = new \Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
}

return $bundles;
Expand Down