Livewire Component within tabs in Resource View

Hi

I have an Infolist Builder, and within it, I ahve created some tabs. Now, I've worked out how to get a Livewire Component to render some content to one of the tabs, but what I would like is for that Livewire Component to display related objects.

I am also able to do that, but rather than showing objects related to the Resource I'm viewing, it shows ALL (in my component I have $table->query(Related::query()) so that doesn't really surprise me that it does that.

What I would like to know is how I can get the parent Resource model/ID in the Component to be able to alter the query method to only return related models
Solution
perhaps:
  Livewire::make(ListVIPs::class, ['customer' => $infolist->getRecord()])

then in ListVIPs class, define customer public property to use it in ur query or elsewhere.
refer to this: https://filamentphp.com/docs/3.x/infolists/advanced#passing-parameters-to-a-livewire-component
Was this page helpful?