Is there a more succinct way of retrieving a count of a resource inside a `ManageRelatedRecords`?
I'm trying to add a navigation badge to a record sub navigation item. Inside my
ManageRelatedRecords
page, I'm doing the following:
I'm wondering if there is a way to get the parent record without doing the request()->route()->parameter('record')
search?5 Replies
I was getting away with this for a while until I realized it doesn't work with table polling. I'm assuming because the way requests work in livewire and ajax not having the url parameter anymore.
If anyone knows of a way to get the resource record let me know. Because the function is static, I can't use
$this->getOwnerRecord()
did you ever get a solution for this? I am struggling to gain access to the parent record as well
I went with this:
I ran into so many issues with this I just abandoned it. I forget what they were now but it was briefly working then ran into other issues.
shame. Try that snippet above. I tried yours but the it was failing when I added a record. Try my code, seems okay for me
it might have been with the polling
because polling wont have access to the
request()->route()
enable polling on your table and see if it continues to work