0

I have been tasked with the job of creating a CMS using Symfony 3, which will be offered to various different clients to update their websites. There is one installation for our own use, to control the clients' sites, logins etc. and then another installation which will be the client CMS itself. But it only needs to be a single installation in one place that can be accessed by all clients, via their own personal login.

This means, I would like each client to have their own content stored in a separate database, so essentially there would be one CMS location and installation but hooks up to multiple databases. The database that will be used would be dependent on the client that logs in. As far as they are concerned, it would be their own CMS, with their own data.

I cannot see an obvious way of being able to set this up in Symfony 3, as it uses the parameters.yml file to reference the database setup, and also, how would it know which database to use to persist and flush the content to when it's being saved?

Help on this would be much appreciated.

1 Answer 1

0

I think the documentation is crystal clear http://symfony.com/doc/current/doctrine/multiple_entity_managers.html

Sign up to request clarification or add additional context in comments.

2 Comments

All examples I've seen using this only show 2 databases. I'd be using several in this case, and the parameter file would be updated regularly, as new sites are added. Would this be possible?
I have never done this before. But again according to documentation you can import configuration files dynamically which may stored eg in a central database. symfony.com/doc/current/service_container/import.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.