This is a Laravel 5 class that I have at the location app/Database/OTF.php
and use to connect to different databases on the fly.
// Using the same host/password/etc, just changing databases
$otf = new App\Database\OTF(['database' => 'kittens']);
// Get the users table
$users = $otf->getTable('users');
// Find the first user in the table
$first_user = $users->first();
awesome! Thank you very much