Want to access all of our courses? (36 h 00 min)
You also get:
Already a member? Login here
I can't understand what this is for?
switch ($this->notification->notification_class) { case BookingReminder1H::class: $this->notification->user->notify(new BookingReminder1H($this->notification->notifiable)); break; case BookingReminder2H::class: $this->notification->user->notify(new BookingReminder2H($this->notification->notifiable)); break; case BookingReminder5MIN::class: $this->notification->user->notify(new BookingReminder5MIN($this->notification->notifiable)); break; case BookingStartedNotification::class: $this->notification->user->notify(new BookingStartedNotification($this->notification->notifiable)); break;}
this allows us to switch notification class based on what we saved in database. this allows us to quickly add/remove/replace notification classes
Your reminder classes should simply implement the BookingReminderInterface.
This was not the goal of this lesson :)
We don't want to add complications around things, when it is not the focus of a lesson
I can't understand what this is for?
this allows us to switch notification class based on what we saved in database. this allows us to quickly add/remove/replace notification classes
Your reminder classes should simply implement the BookingReminderInterface.
This was not the goal of this lesson :)
We don't want to add complications around things, when it is not the focus of a lesson