load products, totals and histories
This commit is contained in:
parent
846b2ce7a1
commit
72536a702b
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue