*/ public function toArray(Request $request): array { return [ 'id' => $this->id, 'project_id' => $this->project_id, 'name' => $this->name, 'enabled' => $this->enabled, 'event_type' => $this->event_type->value, 'event_type_label' => $this->event_type->label(), 'channel' => $this->channel->value, 'channel_label' => $this->channel->label(), 'channel_configuration' => $this->channel_configuration ?? [], 'filters' => $this->filters ?? [], 'has_delivery_url' => $this->resource instanceof NotificationAction && filled($this->delivery_url), 'message_template' => $this->message_template, 'created_at' => $this->created_at?->toISOString(), 'updated_at' => $this->updated_at?->toISOString(), ]; } }