I have written a middleware terminate function which would send all the logs collected during request execution to an external log server. These logs are collected mostly in helper functions which don't have direct access to request object and it would make my code ugly to send Request as parameter to helper functions when called from controllers.
Is there a clean way to have a global variable in Laravel 5.1 where I can store all the logs to be used later by terminate function?