Change a resource attribute/property from an action.
Hey guys, can i somehow change a resource property/attribute from an action like this?
if not, how can i achieve this?
7 Replies
The idea is to make a read/unread functionality so when the user clicks on a row in the table it marks it as read.
i think this way you overwrite the view action. maybe on the view class in the
mount()
method you could set the read_at
could you maybe give me an example of how you mean?
because the view is in a modal
so is there a way to do this?
you didn't mention that
that maybe use
after()
method instead of action
I created the ViewClass and did as you told me. Thanks a lot
Don't forget to use parent from the method
Here's how I did it in one app: https://discord.com/channels/883083792112300104/1195793041290707065/1195793041290707065