courier = $courierRepo->findCourierById($order->courier_id); $customerRepo = new CustomerRepository(new Customer()); $order->customer = $customerRepo->findCustomerById($order->customer_id); $addressRepo = new AddressRepository(new Address()); $order->address = $addressRepo->findAddressById($order->address_id); $orderStatusRepo = new OrderStatusRepository(new OrderStatus()); $order->status = $orderStatusRepo->findOrderStatusById($order->order_status_id); return $order; } }