Answer the question
In order to leave comments, you need to log in
How to connect to an existing mongo collection in Symfony?
There is an already existing database. It is necessary to implement the frontend on Symfony. There is an option using an additional class, but I wanted to organize it natively.
But how - I can not understand.
Can someone point my finger at the docstring or share their experience?
Answer the question
In order to leave comments, you need to log in
https://symfony.com/doc/current/doctrine/multiple_...
Everything is easier than it seems...
$connection = $this->getDoctrine()->getManager('mongodb')->getConnection();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question