documentable_id; return [ 'id' => $this->id, 'activity_id' => $activityId, 'name' => $this->name, 'type' => $this->type, 'description' => $this->description, 'mime_type' => $this->mime_type, 'file_size' => $this->file_size, 'uploaded_by' => $this->uploaded_by, 'url' => $activityId ? url(route('api.activity.download-document', [ 'activity' => $activityId, 'documentId' => $this->id, ])) : null, 'created_at' => $this->created_at?->toISOString(), ]; } }