*/ public function toArray(Request $request): array { return [ 'id' => $this->variant->product_id, 'product_image_url_snapshot' => $this->product_image_url_snapshot, 'product_name_snapshot' => $this->product_name_snapshot, 'product_variant_name_snapshot' => $this->product_variant_name_snapshot, 'selling_price_snapshot' => (float) $this->selling_price_snapshot, 'quantity' => (int) $this->quantity ]; } }