Accessing table query from stat widget (but inside the ViewRecord page)

Hi all! I am trying to access the table query from a specific table on a ViewRecord page in my resource. https://filamentphp.com/docs/3.x/panels/resources/widgets#accessing-page-table-data-in-the-widget I came accross this piece of docs, and it works great on my ListRecords page, but I was wondering if there is a way to also fetch the query of a table on my ViewRecord page. More specifically, a table that is owned by a relation manager. I tried the trait on as well the ViewRecord page as the RelationManager, but I haven't had any luck so far. Thanks!
3 Replies
awcodes
awcodes14mo ago
A widget is just a livewire component. Just query the data you need it mount()
uzdacpdz (Doug Dimmadome)
Thanks for your reply 🤩 However, with that approach I'm still uncertain how to get access to the search query of the table for example Ideally I'd like to keep them synced up exactly, at all times Just as if with the ListRecords that is explained in the docs
awcodes
awcodes14mo ago
ListRecords::getTableQuery(), maybe? something to that effect
Want results from more Discord servers?
Add your server