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
Post a Comment