Laravel 4: can one model serve several DB tables?
问题 In my application I have several mysql tables: Toronto, Vancouver, Montreal, etc... and I am using the DB-class to work with them, eg. $data = DB::select('select * from toronto where id = ?', array($id)); What I want to do is to start using Eloquent. I am new to Laravel and was just wondering if its possible to have one model work with several tables, smth like: class City extends Eloquent { protected $table_a = 'toronto'; protected $table_b = 'vancouver'; protected $table_c = 'montreal'; }