title: Lumen $request->input() return null in middleware
body: <p>I'm building a RESTful server within Lumen, but <code>$request-&gt;input("something")</code> and even <code>$request-&gt;all()</code> always return empty array or null, when I am passing query parameters to it. So, the question is - what am I doing wrong, and how to get parameters via $request->input () or $request->all ()?</p>
  
  <p><strong>routes/web.php</strong><br></p>
  
  <pre><code>&lt;?php
  
  use Illuminate\Support\Facades\Input;
  use Illuminate\Http\Request;
  
  $router-&gt;group(['prefix' =&gt; 'accounts/{old}'], function () use ($router) {
      $router-&gt;get('register', function ($old)    {
          return 'You are OK! More than 18! '.$old.' years';
      });
  });
  </code></pre>
  
  <p><strong>app/Http/Middleware/OldMiddleware.php</strong><br></p>
  
  <pre><code>&lt;?php
  
  namespace App\Http\Middleware;
  
  use Closure;
  
  class OldMiddleware
  {
      /**
       * Check user old and if it was less than 18 return something and else continue.
       *
       * @param  \Illuminate\Http\Request  $request
       * @param  \Closure  $next
       * @return mixed
       */
      public function handle($request, Closure $next)
      {
          if ($request-&gt;input('old') &lt; 18) { 
              return "You are under 18!";
          }
          return $next($request);
      }
  }
  </code></pre>
  
  <p><strong>bootstap/app.php</strong></p>
  
  <pre><code>$app-&gt;middleware([
      App\Http\Middleware\OldMiddleware::class
  ]);
  </code></pre>
  
  <p><strong>Request example:</strong></p>
  
  <pre><code>curl http://server.loc/accounts/20/register
  </code></pre>
  
  <p>In OldMiddleware.php, The $request->input() return null and I can't access to old passed value in middleware (to validate the age of user)<br></p>