I have a Symfony application, for which I would like to implement a demo online. This demo should allow each user to have its database, not to be shared with others.
Since I would like to avoid to create a new virtualhost for each user, pointing to a freshly created directory right for the new user, with a copy of the code of the symfony app in it, I would prefer to have a single symfony app, which is allowing every user to log in, and then to use the application (shared with others) but pointing to the database of the user.
how can this be done with Symfony?
The best solution I'be found so far is to use the environments: each user has his own environment, therefore with a specific controller (e.g. MyUser.php
in /web
directory), with a dedicated database specified in the database.yml
file.