title: Modify input in laravel middleware
body: <p>Some service makes HTTP request to my site and passes some input. This input has a little bit wrong structure for me, so I'm trying to modify it. </p>
  
  <p>I made a middleware and attached this middleware to my route. The handle method looks like this:</p>
  
  <pre><code>public function handle($request, Closure $next)
  {
      $input = $request-&gt;all();
  
      // Input modification
  
      $request-&gt;replace($input);
      \Log::info($request-&gt;all()); // Shows modified request
  
      return $next($request);
  }
  </code></pre>
  
  <p>However in my controller I got old input. Also I'm a little bit confused since I also use FormRequest, and as I realize these two requests are different entities. Then how can I modify the input in the middleware?</p>