$wo = Warehouse_other_receive_detail::with('item_info.product_sub_group')
->where('item_info.product_sub_group->sub_group_id', 2)
->get();
How to select specific column after relationship in where condition?
$wo = Warehouse_other_receive_detail::with('item_info.product_sub_group')
->where('item_info.product_sub_group->sub_group_id', 2)
->get();
How to select specific column after relationship in where condition?
Copyright © 2021 Jogjafile Inc.
You can condition the relation using
with()If you want only the
Warehouse_other_receive_detailthat haveproduct_sub_group->sub_group_id = 2usehaving()