*/ class MoveImageAction extends MoveAction { /** * The list of disk names. */ public function disks(): array { return Arr::wrap(Config::get(ImageConstants::DISKS_QUALIFIED)); } /** * Get the path to move from. */ protected function from(): string { return $this->model->path; } /** * Update underlying model. * We want to apply these updates through Eloquent to preserve relations when renaming. * Otherwise, reconciliation would destroy the old model and create a new model for the new name. */ protected function update(): Image { $this->model->update([ Image::ATTRIBUTE_PATH => $this->to, ]); return $this->model; } }