More compoonents for forms

This commit is contained in:
2024-07-23 23:50:02 +10:00
parent f32c29fa8c
commit 83bdea458f
12 changed files with 48 additions and 58 deletions

View File

@@ -0,0 +1,17 @@
<div class="form-group">
<div class="input-group has-validation">
<div class="custom-control custom-switch custom-switch-off-danger custom-switch-on-success">
<input type="checkbox" class="custom-control-input @error($name) is-invalid @enderror" id="{{ $id ?? $name }}" name="{{ $name }}" @checked(old($name,$value ?? ''))>
@if(isset($label))
<label class="custom-control-label" for="{{ $id ?? $name }}">{{ $label }}</label>
@endif
</div>
<span class="invalid-feedback" role="alert">
@error($name)
{{ $message }}
@elseif(isset($feedback))
{{ $feedback }}
@enderror
</span>
</div>
</div>