On this page
Available Events
Athena will fire these events:
-
LaraZeus\Athena\Events\AppointmentCreated
Register a Listener:
- First, create your listener:
php artisan make:listener SendAthenaNotification --event=AppointmentCreated
- Second, register the listener in your
EventServiceProvider
protected $listen = [ //... AppointmentCreated::class => [ SendAthenaNotification::class, ],];
- Finally, you can receive the form object in the
handle
method and do whatever you want. For example:
Mail::to(User::first())->send(new Contact( $event->Appointment->subject, $event->user->email, $event->Appointment->subject));