From af788c2d49b9e4599bbf04b5c17df1bc805c7c3b Mon Sep 17 00:00:00 2001 From: Wahyu Ramadhan Date: Wed, 2 Aug 2023 10:49:41 +0700 Subject: [PATCH] Fix default column showed --- app/Http/Controllers/ShowHideColumnController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/ShowHideColumnController.php b/app/Http/Controllers/ShowHideColumnController.php index a2db693..be5292f 100644 --- a/app/Http/Controllers/ShowHideColumnController.php +++ b/app/Http/Controllers/ShowHideColumnController.php @@ -45,12 +45,12 @@ class ShowHideColumnController extends Controller $success = 0; - foreach ($columns as $column) { + foreach ($columns as $key => $column) { $dataAdd = array( 'version_gantt_id'=>$request->version_gantt_id, 'user_id'=>$this->currentId, - 'column_name'=>$column, - 'show'=>true, + 'column_name'=>$key, + 'show'=>$column, 'created_by'=>$this->currentName );