PDFの修正

newbackend
parent 890fc477f5
commit 378ec9904e

@ -799,6 +799,15 @@ class MeetingsController extends Controller {
Storage::disk('private')->put($filename, $pdf);
}
}
else {
// DBにミーティングがある場合
if ($chk = Meeting::select('pdf')->where('id', (int)$meeting_id)->first()) {
$opdf = str_replace('/files/', '', $chk->pdf);
if (Storage::disk('private')->get($opdf)) {
Storage::disk('private')->delete($opdf);
}
}
}
// データベースに保存します。
DB::beginTransaction();
@ -809,6 +818,7 @@ class MeetingsController extends Controller {
$meeting->text = $update['text'];
if (isset($update['memo'])) $meeting->memo = $update['memo'];
if (isset($update['pdf'])) $meeting->pdf = $update['pdf'];
else $meeting->pdf = null;
$meeting->save();

Loading…
Cancel
Save