From b4b6c92e3f64bae277abf717ccb567ccaaf6dccd Mon Sep 17 00:00:00 2001 From: Miguel Bolivar Date: Mon, 5 Aug 2024 15:21:30 +0200 Subject: [PATCH] Allow values in deeper values --- resources/views/partials/fields/matrixRow.blade.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/resources/views/partials/fields/matrixRow.blade.php b/resources/views/partials/fields/matrixRow.blade.php index 739b09557..1da2ce7c0 100644 --- a/resources/views/partials/fields/matrixRow.blade.php +++ b/resources/views/partials/fields/matrixRow.blade.php @@ -2,9 +2,17 @@ @foreach($columns as $column) + @php + $columnsArray = explode('.', $column); + $value= $row; + foreach($columnsArray as $curr) { + $value = $value[$curr] ?? ""; + if ($value == "") break; + } + @endphp {!! $fields[$column] - ->value($row[$column] ?? '') + ->value($value) ->prefix($name) ->id("$idPrefix-$key-$column") ->name($keyValue ? $column : "[$key][$column]")