TIP 08 / 08

Discover All Events Fired in One Request.

If you want to implement a new listener to a specific event but you don't know its name, you can log all events fired during the request.

You can use the \Illuminate\Support\Facades\Event::listen() method on boot() method of app/Providers/EventServiceProvider.php to catch all events fired.

Important: If you use the Log facade within this event listener then you will need to exclude events named Illuminate\Log\Events\MessageLogged to avoid an infinite loop. (Example: if ($event == 'Illuminate\\Log\\Events\\MessageLogged') return;)

code
// Include Event...
use Illuminate\Support\Facades\Event;

// In your EventServiceProvider class...
public function boot()
{
    parent::boot();

    Event::listen('*', function ($event, array $data) {
        // Log the event class
        error_log($event);

        // Log the event data passed to the listener.
        error_log(json_encode($data, JSON_PRETTY_PRINT));
    });
}