I know that in Laravel you can use multiple database connections by specifying them in the config/database.php
file, then using DB::connection('my_conn_name')
, but is there anyway to use a connection that is not specified in the config/database.php
file?
I am writing an archiving application, so the user can specify what connection they would like to use for the process (host, user and password), and I am hoping that I can return the results from show databases
for the supplied connection.