Log all events

Submitted by clarkeash - 3 years ago

Gives you the ability to log all events (your own and Laravels built in events)

// app/start/local.php

Event::listen('*', function()
{
    Clockwork::info(Event::firing()); // uses clockwork - https://github.com/itsgoingd/clockwork
    //Log::info(Event::firing()); // saves to your log file
});

// You could also do some check before logging, if you only wanted to log your events.

Ads cover the costs of maintaining Laravel-tricks

comments powered by Disqus

Ads cover the costs of maintaining Laravel-tricks