if ($type === 'simple') {
$crud->addClause('where', $name, '1');
} else if ($type === 'dropdown' || $type === 'select2') {
- $crud->addClause('where', $name, $value);
- } else if ($type === 'select2_multiple') {
+ if ($this->getAttribute('allows_multiple')) {
+ if(is_array($value)){
+ $value=json_encode($value);
+ }
+ $crud->addClause('where', $name, 'isnotnull');
+ $crud->addClause('where', $name, 'like', '%"' . $value . '"%');
+ } else {
+ $crud->addClause('where', $name, $value);
+ }
+ } else if ($type === 'select2_multiple' || $type === 'checkbox_multiple') {
$crud->addClause('whereIn', $name, json_decode($value));
} else if ($type === 'date_range') {
$dates = json_decode($value);
<!-- select2 from array -->
@include('crud::fields.inc.wrapper_start')
<label>{!! $field['label'] !!}</label>
+<input type="hidden" value="" name="{{$field['name']}}" />
<ul class="checkbox-multiple">
@if (count($field['options']))
@foreach ($field['options'] as $key => $data)