media = $media; } public function tmpPath(): string { return "/tmp/".str_slug(microtime()); } protected function versionFilename($width, $height): string { return $this->media->filename(). '-'. $width. 'x'. $height. '.'.$this->getExtension(); } public function moveTo(string $source, string $destination): void { if (Storage::exists($destination)) { Storage::delete($destination); } Storage::move($source, $destination); } }