delivery->restaurant_id}.deliveries"), ]; } /** * Get the data to broadcast. */ public function broadcastWith(): array { return [ 'delivery_id' => $this->delivery->id, 'tracking_code' => $this->delivery->tracking_code, 'restaurant_id' => $this->delivery->restaurant_id, 'status' => $this->delivery->status, 'pickup_address' => $this->delivery->pickup_address, 'drop_address' => $this->delivery->drop_address, 'created_at' => $this->delivery->created_at->toIso8601String(), ]; } /** * The event's broadcast name. */ public function broadcastAs(): string { return 'delivery.created'; } }