File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -155,11 +155,13 @@ which is the first one defined or the one configured via the
155155``default_connection `` parameter.
156156
157157Each connection is also accessible via the ``doctrine.dbal.[name]_connection ``
158- service where ``[name] `` is the name of the connection. Or directly in the controller with
159- getConnection method and the name of the connection::
158+ service where ``[name] `` is the name of the connection. In a controller
159+ extending ``AbstractController ``, you can access it directly using the
160+ ``getConnection() `` method and the name of the connection::
160161
161162 $connection = $this->getDoctrine()->getConnection('customer');
162- $result = $connection->fetchAll('select name from customer');
163+
164+ $result = $connection->fetchAll('SELECT name FROM customer');
163165
164166Doctrine ORM Configuration
165167--------------------------
You can’t perform that action at this time.
0 commit comments