My goal is to send a notification to all users enrolled in an event one day before the event's start date. Within my database, I have a user table and events table that both store important information such as event start dates. Additionally, there is an enrollment table that links users to specific events through foreign keys and also contains the start date of these events. As I tried to write the necessary code for this function and run it, I encountered an unexpected error.
class SendNotification extends Command