File tree 1 file changed +4
-3
lines changed
Filter options
1 file changed +4
-3
lines changed
Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ For more information on routing, see :doc:`/routing`.
117
117
single: Controller; Base controller class
118
118
119
119
.. _anchor-name :
120
- :ref: `The Base Controller Classes & Services <the-base-controller-class-services >`
120
+ :ref:`The Base Controller Classes & Services <the-base-controller-class-services>`
121
121
122
122
The Base Controller Classes & Services
123
123
--------------------------------------
@@ -136,8 +136,9 @@ with a service object that can render Twig templates, another that can
136
136
log messages and many more.
137
137
138
138
On the other hand, the ``AbstractController `` prevents you from accessing the
139
- **service container **. This forces you to write a code more robust by
140
- forcing you to explicitly define your dependencies.
139
+ **service container **. When you need an external dependency, this forces you to
140
+ write a code more robust as you have to explicitly define your dependencies by
141
+ using :doc: `the controller as a service </controller/service >`.
141
142
142
143
Add the ``use `` statement atop the ``Controller `` class and then modify
143
144
``LuckyController `` to extend it::
You can’t perform that action at this time.
0 commit comments