Created
December 11, 2013 19:11
-
-
Save angelmartz/7916513 to your computer and use it in GitHub Desktop.
Base de datos diferente modelo Laravel
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
| // Model | |
| class Client extends Eloquent | |
| { | |
| protected $connection = 'masterDb'; | |
| } | |
| // config/database.php | |
| 'masterDb' => array( | |
| 'driver' => 'mysql', | |
| 'host' => 'localhost', | |
| 'database' => 'name', | |
| 'username' => 'user', | |
| 'password' => 'pass', | |
| 'charset' => 'utf8', | |
| 'collation' => 'utf8_unicode_ci', | |
| 'prefix' => '', | |
| ), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment