order = $order; $this->prevOrder = $prevOrder; $this->order->load('customer','shipping_address','billing_address'); $this->customer = $customer; $this->transaction = $transaction; } public function toArray(): array { return [ 'order' => $this->order, 'prev_order' => $this->prevOrder, 'customer' => $this->customer ?? [], 'transaction' => $this->transaction ?? [] ]; } public function getActivityEventModel() { return $this->order; } }