$this->id, 'title' => $this->title, 'description' => $this->description, 'event_date' => $this->event_date->toDateString(), 'start_time' => $this->start_time?->format('H:i'), 'end_time' => $this->end_time?->format('H:i'), 'load_in_time' => $this->load_in_time?->format('H:i'), 'soundcheck_time' => $this->soundcheck_time?->format('H:i'), 'fee' => $this->fee, 'currency' => $this->currency, 'status' => $this->status->value, 'status_label' => $this->status->label(), 'status_color' => $this->status->color(), 'visibility' => $this->visibility->value, 'visibility_label' => $this->visibility->label(), 'rsvp_deadline' => $this->rsvp_deadline?->toIso8601String(), 'notes' => $this->notes, 'internal_notes' => $this->when( $request->user()?->role === 'admin' || $request->user()?->role === 'booking_agent', $this->internal_notes ), 'is_public_setlist' => $this->is_public_setlist, 'location' => new LocationResource($this->whenLoaded('location')), 'customer' => new CustomerResource($this->whenLoaded('customer')), 'setlist' => new SetlistResource($this->whenLoaded('setlist')), 'invitations' => EventInvitationResource::collection($this->whenLoaded('invitations')), 'creator' => new UserResource($this->whenLoaded('creator')), 'created_at' => $this->created_at->toIso8601String(), 'updated_at' => $this->updated_at->toIso8601String(), ]; } }