I have table quotes
like this
Id , quote_title ,...
and quote_items
:
Id , quote_id ,product_id
and products
:
Id,product_name,product_category_id
I want to result of my query sort by product_category_id. this is my query:
$query = Quote::query();
$query->whereHas('quote_item' , function ($query) {
$query->whereHas('product' , function ($query) {
$query->orderBy('product_category_id');
});
});
$temp= $query->find($id);
result not has error but not order by
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire