- config/database.phpにDB接続を複数定義
- クエリービルダーではDB:connection(‘DB接続’)->select(…)
- Eloquentではモデルクラスに$connection=’DB接続’
参考サイト
[Laravel]Laravelで別々のDB(MySQL)に接続させる方法 – Qiita
http://qiita.com/qiita-kurara/items/2e3efb4ccbb2489b05c3
Database: Getting Started – Laravel – The PHP Framework For Web Artisans
https://laravel.com/docs/5.4/database#using-multiple-database-connections
Eloquent: Getting Started – Laravel – The PHP Framework For Web Artisans
https://laravel.com/docs/5.4/eloquent#eloquent-model-conventions