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

23 lines
697 B
PHP
Raw Permalink Normal View History

<div class="form-group">
@if(isset($label))
<label {{ $attributes->only(['class']) }} for="{{ $id ?? $name }}">{{ $label }}</label>
@endisset
2024-07-23 13:50:02 +00:00
<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
2024-07-23 13:50:02 +00:00
{{ $slot }}
<span class="invalid-feedback">
@error((! empty($old)) ? $old : $name)
2024-07-23 13:50:02 +00:00
{{ $message }}
@elseif(isset($feedback))
{{ $feedback }}
@enderror
</span>
</div>
2024-07-23 13:50:02 +00:00
@isset($helper)
<span class="input-helper">{{ $helper }}</span>
@endif
</div>