From 95c9d342a946620b8b93f2e5ac94aa6d3b4e3b5d Mon Sep 17 00:00:00 2001 From: Daeng Deni Mardaeni Date: Thu, 21 Sep 2023 11:08:59 +0700 Subject: [PATCH] update aktif after approval --- Http/Controllers/DocumentController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Http/Controllers/DocumentController.php b/Http/Controllers/DocumentController.php index f88c10d..51db99a 100644 --- a/Http/Controllers/DocumentController.php +++ b/Http/Controllers/DocumentController.php @@ -135,11 +135,12 @@ 'keterangan' => '' ]; + //echo json_encode($detail);exit; + DocumentDetail::create($detail); return redirect()->route('document.index')->with('success', 'Document created successfully.'); } catch (Exception $e) { - return redirect()->route('document.index')->with('error', 'Document created failed, ' . $e->getMessage()); } } @@ -160,6 +161,7 @@ $data = [ 'approval_flag' => $request->flag ?? null, 'status' => $request->keterangan == "" ? '1' : '3', + 'aktif' => 1, 'keterangan' => $request->keterangan ?? null, 'approved_at' => date('Y-m-d H:i:s'), 'approved_by' => $this->user->id