Update SettingsController.php
This commit is contained in:
parent
b826173bcb
commit
cb89f65885
|
@ -86,9 +86,9 @@ class SettingsController extends Controller
|
||||||
$res = $zip->open($zip_safe_path, ZipArchive::CREATE|ZipArchive::OVERWRITE);
|
$res = $zip->open($zip_safe_path, ZipArchive::CREATE|ZipArchive::OVERWRITE);
|
||||||
$result = $this::rglob(storage_path('app/invoice/*'));
|
$result = $this::rglob(storage_path('app/invoice/*'));
|
||||||
if ($res === TRUE) {
|
if ($res === TRUE) {
|
||||||
|
$zip->addFromString("1. Info.txt","This Archive contains all Invoices from all Users!");
|
||||||
foreach($result as $file){
|
foreach($result as $file){
|
||||||
if (file_exists($file) && is_file($file)) {
|
if (file_exists($file) && is_file($file)) {
|
||||||
$zip->addFromString("1. Info.txt","This Archive contains all Invoices from all Users!");
|
|
||||||
$zip->addFile($file,basename($file));
|
$zip->addFile($file,basename($file));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue