title: Symfony multiple databases per client login
body: <p>I'm developping a webapplication in Symfony2. The website is supposed to have a database per client. My idea was to make a main database with information about all organizations and their databases. But now I'm running into some trouble. </p>
  
  <p>Every client has their own users. This information should be stored in their own database. So in my opinion every client should have their own login page. Now I started by adding a prefix to see what client you are : example.com/{client}/ -> controllers .. The thing is you're not allowed to set a parameter in your route for a login page in symfony! So how should I make sure every client has a different login page?</p>
  
  <p>Another thing is security. What is the best way to make sure a user cannot change the route parameter to a different client and get access?</p>
  
  <p>I've been looking for guides on the internet to do what I need to do. But I can't find any solid ways for Symfony2 .. Mostly it's half solutions, for example just switching between the databases via a service. If there is another php framework that does all this much better I would definately consider changing to that too. </p>
  
  <p>I hope you guys can give me some advice. Thanks in advance.</p>