$this->id, 'title' => $this->title, 'description' => $this->description, 'date' => $this->date?->format('Y-m-d'), 'time' => $this->time ? Carbon::parse($this->time)->format('H:i') : null, 'type' => $this->type, 'cover_path' => $this->cover_path, 'cover_url' => $this->cover_path ? Storage::disk('s3')->temporaryUrl($this->cover_path, now()->addHours(24)) : null, 'order' => $this->order, 'media' => $this->whenLoaded('media', fn() => MediaResource::collection($this->media)), 'created_at' => Carbon::parse($this->created_at)->format('Y-m-d H:i:s'), 'updated_at' => Carbon::parse($this->updated_at)->format('Y-m-d H:i:s'), ]; } }