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 );