LaraMonster Pro PRO

Events

Your event classes and listeners, dispatching events from a form, and event guides as PDF.

The Events page lists your app's event classes and who listens to each. Dispatch any event with your own data, from a form built from its constructor, and see exactly what it caused.

Events is part of LaraMonster Pro.

Your events and listeners

LaraMonster reads app/Events and the listeners your app registers (including those discovered automatically). Pick an event to see:

  • Listeners, in order, and whether each is queued
  • Dispatched from: the places in your code that fire it
  • Its constructor parameters

An event nothing listens to says so: dispatching it would change nothing. No events yet? Create one with php artisan make:event.

Dispatching an event

Fill in the form built from the event's constructor and click Dispatch. LaraMonster runs it in your project, like the app would: listeners run, queued ones are queued, mail goes to the inbox.

For anything a form can't express, switch to PHP and write any expression that returns the event. It runs in your project, with your models:

new \App\Events\OrderShipped(
    \App\Models\Order::latest()->first(),
    trackingNumber: 'TRK-1042',
)

Afterwards, What it caused shows the listeners' responses and everything that happened, and Open as trace opens it in Activity.

Event guides as PDF

Export guide (PDF) makes a short document for one event: what it is, what it carries, where it's fired and every listener. Hand it to a new teammate instead of a screenshot.