title: Is it advisable to bind application data to request in Laravel 5
body: <p>Would it be advisable, if i am doing authentication in a middleware and adding some data to the <code>\Illuminate\Http\Request  $request</code> object and using that data in the controller by injecting <code>\Illuminate\Http\Request  $request</code> into the controller method?</p>
  
  <p>The reason, the app needs to make a database call to find out if the credentials are valid and if it is, it returns something like a primary key that i use in subsequent db operations.</p>
  
  <p>At the moment, everything is done in the controller. If i were to use a separate middleware for authentication, can i bind the data that my controller needs to the request object if the middleware check passes? if so, how should i go about doing it?</p>
  
  <p>Inspiration - Expressjs way of binding and passing data along the request through a stack of middlewares / routes.</p>