@props([ 'name' => 'template', 'value' => null, 'errorsBag' => null, 'showErrorSpace' => true, 'options' => [], // wajib: array of template ]) @php $bag = $errorsBag ?? $errors ?? session('errors'); $hasError = $bag && $bag->has($name); @endphp
@foreach($options as $key => $item) @endforeach
{{-- FLUENT ERROR MESSAGE --}} @if($showErrorSpace)
@if($hasError) @foreach($bag->get($name) as $message)
{{ $message }}
@endforeach @endif
@endif