storePublicly($path, 'public'); } else { return null; } } public function updateImage($image) : ?string { if (isset($this->image) && isset($image)) { Storage::delete($this->image); self::imagePath($image); } else { return null; } } }