log->scanned_at?->format('h:i A') ?? now()->format('h:i A'); $wasteTypeStr = $this->log->waste_type ? strtolower($this->log->waste_type) . ' ' : ''; return [ 'type' => 'waste.collected', 'collection_log_id' => $this->log->id, 'message' => "Your {$wasteTypeStr}waste was successfully collected at {$time}.", 'action_label' => 'View History', 'action_url' => '/collections', ]; } public function toSms(mixed $notifiable): array { $time = $this->log->scanned_at?->format('h:i A') ?? now()->format('h:i A'); $wasteTypeStr = $this->log->waste_type ? strtolower($this->log->waste_type) . ' ' : ''; return [ 'to' => $notifiable->phone, 'message' => "Verde: Your {$wasteTypeStr}waste was successfully collected at {$time}.", ]; } public function toPush(mixed $notifiable): array { $time = $this->log->scanned_at?->format('h:i A') ?? now()->format('h:i A'); $wasteTypeStr = $this->log->waste_type ? strtolower($this->log->waste_type) . ' ' : ''; return [ 'title' => 'Waste Collected', 'body' => "Your {$wasteTypeStr}waste was successfully collected at {$time}.", 'data' => [ 'type' => 'waste.collected', 'collection_log_id' => (string) $this->log->id, ], ]; } }