This commit is contained in:
2025-10-29 00:28:22 +05:00
parent 74a8556ba8
commit 75a7880d67

View File

@@ -31,7 +31,7 @@ class CardRequisiteRepository
$path = $this->generateFile($record, $response);
return response()->download(public_path($path));
return response()->download($path);
}
/**
@@ -85,14 +85,14 @@ class CardRequisiteRepository
]);
$unique_folder_name = Str::snake(str_replace(':', '-', $model->created_at->toDateTimeString()));
$dir = public_path("files/card-requisite/{$unique_folder_name}");
$dir = storage_path("card-requisite/{$unique_folder_name}");
File::makeDirectory($dir, 0777, true, true);
$filePath = $dir."/{$model->id}.docx";
$filePath = $dir."/kart-rekwizit-{$model->id}.docx";
$templateProcessor->saveAs($filePath);
return "files/card-requisite/{$unique_folder_name}/kart-rekwizit-{$model->id}.docx";
return $filePath;
}
}