Skip to content

Instantly share code, notes, and snippets.

@angelmartz
Created December 11, 2013 19:11
Show Gist options
  • Select an option

  • Save angelmartz/7916513 to your computer and use it in GitHub Desktop.

Select an option

Save angelmartz/7916513 to your computer and use it in GitHub Desktop.
Base de datos diferente modelo Laravel
// 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