Pass record to infolist from action

I have a table view action that has a slideover. I'm passing it an info list. I can't seem to pass the current record over. I want to show/hide a button when there is a relationship. How do I pass the current record to the infolist Action::make()->infolist([ entries..... if(record.doesntHave('relationship')->get()) show action button to create the missing relation ship. ])->slideover()
2 Replies
LeandroFerreira
LeandroFerreira8mo ago
Injecting the record? ->visible(fn(Model $record): bool => $record->relation->exists())
thedangler
thedanglerOP8mo ago
right but for some reason the info list is not passing on the model
Want results from more Discord servers?
Add your server