Page Event Common PHP Function for afterAdd

Hi using Radsystems laravel bootstrap v 8.2.3 I have a function that I need to perform on most afterAdd functions. I tried to put the common function in Custom Endpoints but could not get that to work. Where could I put a function that would be accessible by all afterAdd functions? thanks in advance