wip
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user