lasthourcloud/resources/views/components/inputs/select.blade.php

26 lines
485 B
PHP
Raw Normal View History

2023-05-04 08:45:09 +00:00
@props([
'id' => null,
'label' => null,
'required' => false,
])
<span @class(['flex flex-col'])>
<label for={{ $id }}>
@if ($label)
{{ $label }}
@else
{{ $id }}
@endif
@if ($required)
*
@endif
</label>
<select {{ $attributes }} wire:model.defer={{ $id }}>
{{ $slot }}
</select>
@error($id)
<div class="text-red-500">{{ $message }}</div>
@enderror
</span>