{{ html()->form('POST', route('booking.assigned'))->attribute('data-toggle', 'validator')->open() }}
{{ html()->hidden('id',$bookingdata->id ?? null) }}
{{ html()->label(__('messages.select_name', ['select' => __('messages.handyman')]) . ' *', 'handyman_id')->class('form-control-label')}}
@php
if($bookingdata->booking_address_id != null)
{
$route = route('ajax-list', ['type' => 'handyman', 'provider_id' => $bookingdata->provider_id, 'booking_id' => $bookingdata->id ]);
} else {
$route = route('ajax-list', ['type' => 'handyman', 'provider_id' => $bookingdata->provider_id ]);
}
$assigned_handyman = $bookingdata->handymanAdded->mapWithKeys(function ($item) {
return [$item->handyman_id => optional($item->handyman)->display_name];
});
@endphp
{{ html()->select('handyman_id[]', [$bookingdata->handymanAdded->pluck('handyman_id')], $assigned_handyman)
->class('select2js form-group')
->id('handyman_id')
->required()
->attribute('data-placeholder', __('messages.select_name', ['select' => __('messages.handyman')]))
->attribute('data-ajax--url', $route)
}}