Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

acrm's avatar
Level 1

Resource Hook afterUpdate does not apply for attach/detach?

Hi all,

when using the afterUpdate Hook to trigger some events/actions after a resource has been updated I found that this does not apply for attaching/ detaching other models to the Nova resource that I want to "hook in" for.

How could I set a hook for the event "another object has been attached/detached to a specific resource?

Have a nice day.

0 likes
1 reply
acrm's avatar
acrm
OP
Best Answer
Level 1

I found the solution myself by "intense googling" :-). You can have a model setup for the pivot relationship you want to catch the events for and then setup an the corresponding observer. Works just fine.

Please or to participate in this conversation.