title: setlocale and getlocale in lumen 5.6
body: <p>I was trying to localize my application and in the middleware, I am getting the locale from the request object. Now I need to access this outside the controller while running a job.</p>
  
  <p>As from the documentation, I can see that the app() can hold this data. But <code>app()-&gt;setLocale()</code>  and <code>app()-&gt;getLocale()</code> is not working for me in lumen 5.6.</p>
  
  <p>Ant help will be much appreciable.</p>