title: Lumen FatalThrowableError on validation
body: <p>I've been struggling with this for a while now.
  Here's the code I've got.</p>
  
  <blockquote>
  <pre><code>public function store(Request $request)
  {
      $validator = Validator::make($request-&gt;all(), [
          'name' =&gt; 'required|max:100'
      ]);
      if ($validator-&gt;fails()) {
          //do something
      }
  }
  </code></pre>
  </blockquote>
  
  <p>The problem is that I get a FatalThrowableError right in my face with the following message: </p>
  
  <blockquote>
    <p>Call to a member function parameter() on array</p>
  </blockquote>
  
  <p>I can't find what I'm doing wrong. I'd appreciate some help here. 
  And also, I've had this validation before which worked:</p>
  
  <pre><code>    $this-&gt;validate($request, [
          'name' =&gt; 'required|unique:developers|max:100'
      ]);
  </code></pre>
  
  <p>But the thing with this one is, I had no idea how to catch when the validation failed. Is it possible to catch the validation fail when using it this way?</p>
  
  <p>Using version: "laravel/lumen-framework": "5.2.*"</p>