How to know when a record had been displayed
Evening all,
I've got a 'has seen' to populate when a table row is displayed, (Messages table basically, want to record when message has been displayed)
Looked into all the 'hooks' I can find. Haven't seen anything that allows me to call a function on a table render etc.
Got no idea where to start on this...gratefully receive suggestions!
Solution:Jump to solution
Ok, since not using Spatie Activity Log just yet, couldn't do that.
But, did lead indirectly to a solution, which was to simply leverage a table action ->visible closure to do the work:
```...
7 Replies
What’s is the use case?
It's an internal messaging system, (and for legal reasons, I've never heard of WhatsApp...)

Are you talking about Filament tables? Can you show an example? You can maybe use the "rendered" lifecycle hook from Livewire: https://livewire.laravel.com/docs/lifecycle-hooks
Laravel
Lifecycle Hooks | Laravel
A full-stack framework for Laravel that takes the pain out of building dynamic UIs.
That is just a filament table. I've had a look through the various hooks in the Filament Docs, but couldn't find anything for table load\view etc.
I can have a look at Livewire, but I expect that means stepping outside of the panel builder options, and into a custom page\component ?
We do this for senstive information, and what I did was user Spatie Acitvity Log and say for a record action I did:
and for a page/list view I did:
Thanks @toeknee, shall check it out.
Solution
Ok, since not using Spatie Activity Log just yet, couldn't do that.
But, did lead indirectly to a solution, which was to simply leverage a table action ->visible closure to do the work: