Issue with multi-select and $data array

The $data array is null even if I add an item / items in the multi select
Actions\Action::make('assign_ticket')
->form([
Select::make('users')
->label('Technical Support User')
->multiple()
->relationship('technicalSupport', 'email', function ($record, Builder $query) {
$query
->where('department_id', $record->department_id)
->where('level_id', '=', 2);
})
->required(),
])
->action(function (array $data, Ticket $record): void {
dd($data);
}),
Actions\Action::make('assign_ticket')
->form([
Select::make('users')
->label('Technical Support User')
->multiple()
->relationship('technicalSupport', 'email', function ($record, Builder $query) {
$query
->where('department_id', $record->department_id)
->where('level_id', '=', 2);
})
->required(),
])
->action(function (array $data, Ticket $record): void {
dd($data);
}),
1 Reply
Patrick Boivin
Patrick Boivin14mo ago
Something to try:
->action(function ($livewire) {
dd($livewire->mountedActionData);
})
->action(function ($livewire) {
dd($livewire->mountedActionData);
})
Want results from more Discord servers?
Add your server