Laravel 4 - How to use where conditions for relation's column
问题 This is what I want, I have two tables. one is 'Restaurants' and other is 'Facilities'. The tables are simple.. and One-To-One relations. like there is a restaurant table with id , name , slug , etc and another table called facilities with id , restaurant_id , wifi , parking , etc Here are my models: class Restaurant extends Eloquent { protected $table = 'restaurants'; public function facilities() { return $this->hasOne('Facilities'); } } class Facilities extends Eloquent { protected $table =