Thunder is a premium package,
get your license here
On this page
Available Events
Thunder will fire these events:
-
LaraZeus\Thunder\Events\TicketCreated
Register a Listener:
- First, create your listener:
1php artisan make:listener SendThunderNotification --event=TicketCreated
- Second, register the listener in your
EventServiceProvider
1protected $listen = [2 //...3 TicketCreated::class => [4 SendThunderNotification::class,5 ],6];
- Finally, you can receive the form object in the
handle
method and do whatever you want. For example:
1Mail::to(User::first())->send(new Contact(2 $event->ticket->subject, $event->user->email, $event->ticket->subject3));