public static function init() { Event::register( 'earned_token', 'Model_User_Activity::earned_token' ); Event::register( 'checkin', 'Model_User_Activity::checkin' ); }Then in my app/bootstrap.php I added this line : Model_User_Activity::init(); (Autoloading the user_activity class did not work...) So yeah, this works, but I'm not sure it's the right way to go about it. Please let me know if there's a better way! Thanks very much for any help!
You're right - autoloading works fine, that's not the problem. What I meant when I said it doesn't work is that when the class autoloads, it does not successfully register my events.
The goal is simply to get my events registered before any of the triggers are called. If autoloading a class is the best way to do that, then great - I could use a little help in getting that working because it's not working for me currently. If not, then the more general question is what is the best way to register my events?
As I said in my OP, I added a line in my app/bootstrap.php that essentially registers the events. And this works fine, but it strikes me as probably not the best way to do it, right? It looks like you're new here. If you want to get involved, click one of these buttons!