Forms\Components\Repeater::make('requestTravellers')
->relationship()
->columnSpanFull()
->reorderable(0)
->addActionLabel('Select another Traveller')
->simple(
Forms\Components\Select::make('traveller_id')
->relationship(
name: 'travellers',
titleAttribute: 'first_name',
modifyQueryUsing: fn(Builder $query) => $query->where('company_id', Auth::user()->company_id)
)
->getOptionLabelFromRecordUsing(fn(Model $record) => "{$record->full_name} | {$record->email}")
->createOptionForm(fn(Form $form) => TravellerResource::form($form))
->required(),
)
->grid(2),
Forms\Components\Repeater::make('requestTravellers')
->relationship()
->columnSpanFull()
->reorderable(0)
->addActionLabel('Select another Traveller')
->simple(
Forms\Components\Select::make('traveller_id')
->relationship(
name: 'travellers',
titleAttribute: 'first_name',
modifyQueryUsing: fn(Builder $query) => $query->where('company_id', Auth::user()->company_id)
)
->getOptionLabelFromRecordUsing(fn(Model $record) => "{$record->full_name} | {$record->email}")
->createOptionForm(fn(Form $form) => TravellerResource::form($form))
->required(),
)
->grid(2),