Invoice PAIN & CSV can be uploaded

This commit is contained in:
2026-02-13 22:37:27 +01:00
parent cd526231ed
commit 4f4dff2edd
29 changed files with 1635 additions and 193 deletions

View File

@@ -0,0 +1,29 @@
<?php
namespace App\Providers;
use App\Models\Tenant;
use ZipArchive;
class ZipArchiveFileProvider {
private ZipArchive $zipArchive;
public function __construct(string $filename) {
$this->zipArchive = new ZipArchive();
$this->zipArchive->open(storage_path('app/private/' . $filename), ZipArchive::CREATE | ZipArchive::OVERWRITE);
}
public function addFile(string $filename) {
$filename = storage_path('app/private/' . $filename);
if (!file_exists($filename)) {
dd($filename);
}
$this->zipArchive->addFile($filename, basename($filename));
}
public function create() : bool {
$this->zipArchive->close();
return true;
}
}