Summer Sale! All accounts are 50% off this week.

terjelundemotangen's avatar

AttachAction and ->recordSelectOptionsQuery

I got an Order where I can attach a Privateclass. And I only want to see Privateclasses to current Event (to which this order belongs). So this is working:

AttachAction::make()
->recordSelectOptionsQuery(fn (Builder $query, Component $livewire) => $query->where('event_id', $livewire->ownerRecord->event_id))
->preloadRecordSelect()

Now I get the dates back and can choose between them. But I also need the instructor's name through a pivot table in the same drop down. And I want to format the dates returned. Is that possible?

0 likes
0 replies

Please or to participate in this conversation.