Commit ec141ae4 by Aan Choesni Herlingga

bug fix is_active slider and gallery

parent 3087496c
...@@ -55,6 +55,7 @@ abstract class StorageRepository ...@@ -55,6 +55,7 @@ abstract class StorageRepository
$data[$tipe] = $filename; $data[$tipe] = $filename;
} }
array_key_exists('is_active', $data) ? $data['is_active'] = 1 : $data['is_active'] = 0;
$request['userid_created'] = auth()->user()->id; $request['userid_created'] = auth()->user()->id;
return $this->model->create($data); return $this->model->create($data);
} }
...@@ -86,7 +87,9 @@ abstract class StorageRepository ...@@ -86,7 +87,9 @@ abstract class StorageRepository
$data[$tipe] = $filename; $data[$tipe] = $filename;
} }
array_key_exists('is_active', $data) ? $data['is_active'] = 1 : $data['is_active'] = 0;
$data['userid_updated'] = auth()->user()->id; $data['userid_updated'] = auth()->user()->id;
return $model->update($data); return $model->update($data);
} }
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
<label class="col-md-2 control-label">Status</label> <label class="col-md-2 control-label">Status</label>
<div class="col-md-6"> <div class="col-md-6">
<center><label class="switch"> <center><label class="switch">
{{ Form::checkbox('is_active', 1, true) }} {{ Form::checkbox('is_active', $data->is_active, $data->is_active) }}
<span></span> <span></span>
</label></center> </label></center>
</div> </div>
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
<label class="col-md-2 control-label">Status</label> <label class="col-md-2 control-label">Status</label>
<div class="col-md-6"> <div class="col-md-6">
<center><label class="switch"> <center><label class="switch">
{{ Form::checkbox('is_active', 1, true) }} {{ Form::checkbox('is_active', $data->is_active, $data->is_active) }}
<span></span> <span></span>
</label></center> </label></center>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment