load products, totals and histories

This commit is contained in:
Edward Yang 2022-08-12 14:25:51 +08:00
parent 846b2ce7a1
commit 72536a702b
1 changed files with 2 additions and 2 deletions

View File

@ -90,11 +90,11 @@ class OrderRepo
*/
public static function getOrderByNumber($number, $customer)
{
$order = Order::query()
return Order::query()
->with(['orderProducts', 'orderTotals', 'orderHistories'])
->where('number', $number)
->where('customer_id', $customer->id)
->first();
return $order;
}