Level 41
Can you share the full error stack trace?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have this error in my Livewire componenet (Nested arrays may not be passed to whereIn method) whenever I try to retrieve the interests.
class UpdateForm extends Component implements HasForms
{
use InteractsWithForms;
public Event $event;
public ?array $state = [];
public function mount(Event $event): void
{
$this->event = $event;
//$this->event->interests->pluck('id')->toArray();
$this->form->fill($event->toArray());
}
public function form(Form $form): Form
{
return $form
->schema([
Select::make('interests')
->relationship('interests', 'name', modifyQueryUsing: fn(Builder $query) => $query->inRandomOrder())
->searchable()
->preload()
->multiple()
->required()
->rules(['required', 'array', 'min:6', 'max:30']),])->statePath('state')->model($this->event);
}
In my EventResource it works fine, but in my livewire component, it doesn't. The relation is belongsToMany(), table is event_interest
Please or to participate in this conversation.