events - Where do you put Log::listen? -


i have simple laravel 5 application.

i don't know put snippet

log::listen(function($level, $message, $context) {     //     dostuff(); }); 

i tried put in routes.php but:

  • first, dostuff() never reached
  • secondly, i'm not sure right place have artisan commands , don't think use routes file.

thanks advice.

one place write new middleware or own serviceprovider. find myself middleware easier.

read more http://laravel.com/docs/5.0/middleware


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -