filesystem = $filesystem; $this->zipper = $zipper; } public function extract(string $file, string $destination): void { $zip = $this->zipper; $resource = $zip->open($file); if ($resource === true && $zip->extractTo($destination)) { $zip->close(); $this->filesystem->delete($file); } else { throw new Exception(trans('admin.download.errors.unzip')); } } }