leenooks/resources/components/form/base.blade.php

24 lines
650 B
PHP

@if(isset($label))
<label for="{{ $id ?? $name }}">{{ $label }}</label>
@endisset
<div class="form-group">
<div class="input-group has-validation">
@if(isset($icon) || isset($prepend))
<div class="input-group-prepend">
<span class="input-group-text">@isset($icon)<i class="fas fa-fw {{ $icon }}"></i>@endisset @isset($prepend){!! $prepend !!}@endisset</span>
</div>
@endif()
{{ $slot }}
<span class="invalid-feedback" role="alert">
@error($name)
{{ $message }}
@elseif(isset($feedback))
{{ $feedback }}
@enderror
</span>
</div>
@isset($helper)
<span class="input-helper">{{ $helper }}</span>
@endif
</div>