title: Laravel Middleware changing header before passing to controller
body: <p>I'm trying to change the header of my request before passing it to the controller using a middleware but it seems <code>$next($request)</code> executes the code in my controller. Is there a way to change the header then send the updated request to my controller?</p>
  
  <p>My middleware:</p>
  
  <pre><code>class JWTAuthenticator
  {
  
  public function handle($request, Closure $next)
  {   
      $token =JWTAuth::getToken();
      $my_new_token = JWTAuth::refresh($token);
      //it runs here
      $response = $next($request);
  
      //it runs this part after executing the controller  
      $response-&gt;header('Authorization','Bearer '.$my_new_token);
      return $response;
  }
  </code></pre>
  
  <p>This is how the middleware is assigned to my route:</p>
  
  <pre><code>Route::get('/{user}', 'v1\UserController@find')-&gt;middleware('jwt_auth');
  </code></pre>