Skip to content

Commit bcb84de

Browse files
Ferrorjaviereguiluz
authored andcommitted
Fix documentation for a controllers with __invoke function in php routing
Hi there current docs tell that proper using controller with ```__invoke``` class should be implemented by: ``` // if the action is implemented as the __invoke() method of the // controller class, you can skip the ', method_name]' part: // ->controller([BlogController::class]) ``` which is wrong. The doc should be without [] brackets: ``` // ->controller(BlogController::class) ```
1 parent 6490b30 commit bcb84de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routing.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ the ``BlogController``:
137137
138138
// if the action is implemented as the __invoke() method of the
139139
// controller class, you can skip the ', method_name]' part:
140-
// ->controller([BlogController::class])
140+
// ->controller(BlogController::class)
141141
;
142142
};
143143

0 commit comments

Comments
 (0)