Skip to content

Commit

Permalink
allows arrays on checkbox values
Browse files Browse the repository at this point in the history
  • Loading branch information
spencerrlongg committed Feb 20, 2024
1 parent 115e0fc commit c6d85a1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/Http/Controllers/Api/AssetsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,11 @@ public function update(ImageUploadRequest $request, $id)
$asset->{$field->db_column} = \Crypt::encrypt($request->input($field->db_column));
}
} else {
if ($field->element == 'checkbox') {
if(is_array($field_val)) {
$field_val = implode(',', $field_val);
}
}
$asset->{$field->db_column} = $request->input($field->db_column);
}
}
Expand Down

0 comments on commit c6d85a1

Please sign in to comment.