$this->id, 'organisation_id' => $this->organisation_id, 'parent_event_id' => $this->parent_event_id, 'name' => $this->name, 'slug' => $this->slug, 'start_date' => $this->start_date->toDateString(), 'end_date' => $this->end_date->toDateString(), 'timezone' => $this->timezone, 'status' => $this->status, 'allowed_transitions' => Event::STATUS_TRANSITIONS[$this->status] ?? [], 'event_type' => $this->event_type, 'event_type_label' => $this->event_type_label, 'sub_event_label' => $this->sub_event_label, 'is_recurring' => $this->is_recurring, 'is_festival' => $this->resource->isFestival(), 'is_sub_event' => $this->resource->isSubEvent(), 'is_flat_event' => $this->resource->isFlatEvent(), 'has_children' => $this->resource->hasChildren(), 'created_at' => $this->created_at->toIso8601String(), 'updated_at' => $this->updated_at->toIso8601String(), 'children_count' => $this->whenCounted('children'), 'organisation' => new OrganisationResource($this->whenLoaded('organisation')), 'parent' => new EventResource($this->whenLoaded('parent')), 'children' => EventResource::collection($this->whenLoaded('children')), ]; } }