modelType) ->where('fileable_id', $dto->modelId) ->first(); $oldFile?->delete(); // The physical file is destroyed via the model's booted() event // 2. Delegate to the base upload action, passing the relation name down the chain return $this->uploadAction->execute( uploadedFile: $newFile, dto: $dto, ); } }