Skip to content

Commit

Permalink
Merge pull request #5748 from Laravel-Backpack/fix-enum-field
Browse files Browse the repository at this point in the history
fix enum field array conversion
  • Loading branch information
pxpm authored Jan 16, 2025
2 parents 99b7aed + cd8d344 commit afb9604
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/resources/views/crud/fields/enum.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,9 @@
})->toArray(),
default => null
};
$field['value'] = is_array($field['value']) ? $field['value'] : [$field['value']];
}
$field['value'] = is_array($field['value']) ? $field['value'] : (!empty($field['value']) ? [$field['value']] : []);
@endphp

@include('crud::fields.inc.wrapper_start')
Expand Down

0 comments on commit afb9604

Please sign in to comment.