26 lines
886 B
PHP
Raw Normal View History

2022-06-01 10:15:55 +03:00
<input type="checkbox"
name="{{ $name }}"
class="rounded-sm text-purple border-gray-300 cursor-pointer disabled:bg-gray-200 focus:outline-none focus:ring-transparent"
id="{{ ! empty($attributes[':id']) ? $attributes[':id'] : $id }}"
@if ($value)
2022-06-02 18:48:14 +03:00
value="{!! $value !!}"
2022-06-01 10:15:55 +03:00
@endif
@if (! empty($checked) && (string) $checked != 'n/a')
checked="checked"
@endif
@if ($disabled)
disabled="disabled"
@endif
@if ($required)
required="required"
@endif
@if ($readonly)
readonly="readonly"
@endif
{{ $attributes->except(['placeholder', 'disabled', 'required', 'readonly', 'v-error', 'v-error-message', 'option', 'optionKey', 'optionValue']) }}
/>
<label class="form-control-label ml-2" for="{{ ! empty($attributes[':id']) ? $attributes[':id'] : $id }}">
{{ !empty($option) ? $option->$optionValue : $label }}
</label>