dealhub/resources/views/components/ui/select.blade.php
kusowl d62b6977c4 feat(user dashboard): add user-specific dashboard with deal listings
- Created a dedicated UserDashboardController to handle user-related logic.
- Added deal listing views and components for users, including action toolbars, broker contact, and stat badges.
- Refactored UI components to support new features like toggle buttons and improved input handling.
- Updated routes with a new prefix for user-related pathways, ensuring a better structure across dashboards.
2026-01-14 17:42:56 +05:30

40 lines
1.0 KiB
PHP

@props([
'options' => [],
'name' => '',
'placeholder' => '',
'labelKey' => 'label',
'valueKey' => 'value',
'label' => '',
'required' => false,
'selected' => ''
]
)
<div class="flex flex-col space-y-2">
@if($label !== '')
<label class="text-sm font-bold" for="{{$name}}">
{{$label}}
@if($required)
*
@endif
</label>
@endif
<select
name="{{$name}}"
required="{{$required?'required':''}}"
class="bg-[#F3F3F5] py-2 px-4 rounded-lg text-sm font-bold invalid:text-accent-600 text-black h-full"
>
@if($placeholder !== '')
<option {{old($name) === ''? 'selected' : ''}} disabled>{{$placeholder}}</option>
@endif
@foreach($options as $option)
<option
value="{{$option[$valueKey]}}" {{$option[$valueKey] == old($name, $selected) ? 'selected' : ''}}> {{$option[$labelKey]}} </option>
@endforeach
</select>
<x-ui.inline-error :name="$name"/>
</div>