Edit Lifecycle hooks ->before is not working
Hi, I'm trying to use the ->before() to add some logic to the record but is not being triggered.
any ideas?
1 Reply
Hi,
I had a similar problem getting the "after" hook to trigger on a CreateAction.
I was able to get this to work by adding an afterCreate method to the resource's corresponding create page and define the logic there.
So in your case, find the Edit page for that resource (OrderResource?) and add a "beforeSave()"
protected function beforeSave(): void
{
// Logic here
}
That worked on my v3 instance.