Laravel eloquent query on a relational table
问题 i am fairly new to laravel eloquent and i am trying to write a nested query to get data of food and food of resturent I have two table one is 'food_list' which mainly contain 'title','type' Type is int 0/1, 0 means veg and 1 means non veg Another table i have resturent _food Which has restaurant_id, food_id,price, image Now i want to get food list of tge resturent which is only veg So i wrote a query like this RestaurantFood:with(['foodDetail'=>function($q){ $q->where('type',0);}])->where('id