Reputation: 1484
I have a simple Laravel 5 application.
I don't know where to put the snippet
Log::listen(function($level, $message, $context)
{
//
doStuff();
});
I tried to put it in the routes.php but:
doStuff()
is never reachedThanks for any advice.
Upvotes: 1
Views: 224
Reputation: 8663
One good place is to write new Middleware or do your own ServiceProvider. I find myself Middleware easier.
Read more from http://laravel.com/docs/5.0/middleware
Upvotes: 1