Skip to content

Commit 8a31539

Browse files
dcsmith926Guikingone
authored andcommitted
method name is 'index' not 'indexAction'
The route definitions here reference a method `indexAction` on the `LeapYearController` but the method is defined as `index`
1 parent d08f6ad commit 8a31539

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

create_framework/http_kernel_controller_resolver.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Update the route definition accordingly::
2424

2525
$routes->add('leap_year', new Routing\Route('/is_leap_year/{year}', array(
2626
'year' => null,
27-
'_controller' => array(new LeapYearController(), 'indexAction'),
27+
'_controller' => array(new LeapYearController(), 'index'),
2828
)));
2929

3030
The move is pretty straightforward and makes a lot of sense as soon as you
@@ -64,7 +64,7 @@ two colons and a method name as a valid callback, like 'class::method'::
6464

6565
$routes->add('leap_year', new Routing\Route('/is_leap_year/{year}', array(
6666
'year' => null,
67-
'_controller' => 'LeapYearController::indexAction',
67+
'_controller' => 'LeapYearController::index',
6868
)));
6969

7070
To make this code work, modify the framework code to use the controller

0 commit comments

Comments
 (0)