Created
October 29, 2014 20:11
-
-
Save eduardocruz/bdee2129c2f3ea11d59e to your computer and use it in GitHub Desktop.
Laravel Dynamimc Database configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Config::set('database.connections.dbconnection', array( | |
'driver' => 'mysql', | |
'host' => $host, | |
'database' => $nome_banco, | |
'username' => $login, | |
'password' => $senha, | |
'charset' => 'utf8', | |
'collation' => 'utf8_general_ci', | |
'prefix' => '', | |
)); | |
Config::set('database.default', 'dbconnection'); | |
$users = DB::select('SELECT * FROM usuarios'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment