$this->id, 'name' => $this->name, 'description' => $this->description, 'total_duration_seconds' => $this->total_duration_seconds, 'formatted_duration' => $this->formattedDuration(), 'is_template' => $this->is_template, 'is_archived' => $this->is_archived, 'items' => SetlistItemResource::collection($this->whenLoaded('items')), 'creator' => new UserResource($this->whenLoaded('creator')), 'created_at' => $this->created_at->toIso8601String(), 'updated_at' => $this->updated_at->toIso8601String(), ]; } }