wip Nutzwerte pdf
This commit is contained in:
1 parent
4ad27d8c19
commit
2296b708eb
31 files changed
+528
-1656
No files matched your search
@@ -10,10 +10,10 @@ use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class Gutachten
|
||||
{
|
||||
public function download($projekts_id, $mode)
|
||||
public function download($projekte_id, $mode)
|
||||
{
|
||||
if ($mode == 'new') {
|
||||
Projekte::where('id', $projekts_id)->update(['pdf_gutachten_name' => '', 'pdf_gutachten_status' => '0']);
|
||||
Projekte::where('id', $projekte_id)->update(['pdf_gutachten_name' => '', 'pdf_gutachten_status' => '0']);
|
||||
}
|
||||
|
||||
$headers = [
|
||||
@@ -23,9 +23,9 @@ class Gutachten
|
||||
'Cache-Control: cache, must-revalidate',
|
||||
];
|
||||
|
||||
$projekt = Projekte::where('id', $projekts_id)->first()->toArray();
|
||||
$projekt = Projekte::where('id', $projekte_id)->first()->toArray();
|
||||
|
||||
$filepath = Storage::disk('public')->path("/download/$projekts_id/");
|
||||
$filepath = Storage::disk('public')->path("/download/$projekte_id/");
|
||||
|
||||
$filename = 'Gutachten '.preg_replace("'[^0-9a-zA-Z]'", '', $projekt['interner_name']).'.pdf';
|
||||
|
||||
@@ -34,9 +34,9 @@ class Gutachten
|
||||
}
|
||||
$file = $filepath.$filename;
|
||||
|
||||
MakeGutachten::generate($file, $projekts_id);
|
||||
MakeGutachten::generate($file, $projekte_id);
|
||||
|
||||
return Response::download($file, $projekt['offizieller_name'], $headers);
|
||||
return Response::download($file, 'Gutachten '.$projekt['offizieller_name'], $headers);
|
||||
|
||||
// if ($projekt['pdf_standardtexte_ok'] == 0) {
|
||||
|
||||
@@ -47,9 +47,9 @@ class Gutachten
|
||||
// }
|
||||
// $file = $filepath.$filename;
|
||||
|
||||
// MakeGutachten::generate($file, $projekts_id);
|
||||
// MakeGutachten::generate($file, $projekte_id);
|
||||
|
||||
// Projekt::where('id', $projekts_id)->update(['pdf_standardtexte' => $filename, 'pdf_standardtexte_ok' => 1]);
|
||||
// Projekt::where('id', $projekte_id)->update(['pdf_standardtexte' => $filename, 'pdf_standardtexte_ok' => 1]);
|
||||
|
||||
// return Response::download($file, $projekt['name'], $headers);
|
||||
// } else {
|
||||
|
||||
Reference in new issue
Block a user