vendredi 18 mars 2016

Laravel: connect to databases dynamically

I'm creating an application in Laravel 5(.1) where it is needed to connect to different databases. The only problem is that it's not known which databases it has to connect to, so making use of the database.php in config is not possible. A controller is in charge of making a connection with dynamically given connection details.

How can I make a new connection to a database, including making use of the DB class? (Or is this possible)

Thanks in advance!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire