you are reading the documentation for version
v3
to check your version use:
to check your version use:
composer show lara-zeus/thunder
On this page
Available Events
Thunder will fire these events:
-
LaraZeus\Thunder\Events\TicketCreated
Register a Listener:
- First, create your listener:
php artisan make:listener SendThunderNotification --event=TicketCreated
- Second, register the listener in your
EventServiceProvider
protected $listen = [ //... TicketCreated::class => [ SendThunderNotification::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->ticket->subject, $event->user->email, $event->ticket->subject));