Skip to content

Commit 887334f

Browse files
author
takielias
committed
Fix formatValue in initShow.
1 parent 152368a commit 887334f

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

resources/views/crudboard/show.blade.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
<div class="card">
44
<div class="card-header">
55
<h5 class="card-title">
6-
@if($show->getTitle())
7-
{{ $show->getTitle() }}
6+
@if($show->getTitle())
7+
{{ $show->getTitle() }}
88
@else
9-
{{ $attributes['title']}}
9+
{{ $attributes['title']}}
1010
@endif
1111
</h5>
1212
</div>
@@ -21,8 +21,11 @@
2121
@php
2222
$value = $field->getValue() ;
2323
$record = $show->getRecord();
24+
if($formaterFunc = $field->getFormatValueCallable()){
25+
$value = $formaterFunc($value,$record);
26+
}
2427
@endphp
25-
<x-dynamic-component :component="$component" :$value :$record />
28+
<x-dynamic-component :component="$component" :$value :$record/>
2629
@else
2730
{{$field->getValue()}}
2831
@endif

0 commit comments

Comments
 (0)