Skip to content

Commit ee8112c

Browse files
committed
attribute casting modif for address field
1 parent 5bece31 commit ee8112c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/resources/views/fields/address.blade.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
<!-- text input -->
2+
3+
<?php
4+
5+
// the field should work whether or not Laravel attribute casting is used
6+
if (isset($field['value']) && (is_array($field['value']) || is_object($field['value']))) {
7+
$field['value'] = json_encode($field['value']);
8+
}
9+
10+
?>
11+
212
<div @include('crud::inc.field_wrapper_attributes') >
313
<label>{!! $field['label'] !!}</label>
414

0 commit comments

Comments
 (0)