title: Check if validation failed in laravel
body: <p>I would like to know when a validation failed by using this kind of code writing (I'm using <a href="https://laravel.com/docs/5.4/" rel="noreferrer">laravel 5.4</a>)</p>
  
  <pre><code>$this-&gt;validate($request, [
      'name' =&gt; 'required|min:2|max:255'
  ]);
  </code></pre>
  
  <p>I know that I can use this:</p>
  
  <pre><code>$validator = Validator::make($request-&gt;all(), [
      'name' =&gt; 'required|min:2|max:255'
  ]);
  
  if ($validator-&gt;fails()) { //Not okay }
  </code></pre>
  
  <p>But I would like to keep this way of validating by using <code>$this-&gt;validate</code> instead of using the <code>Validator</code> model.</p>
  
  <p>So ... is it possible to use something like:</p>
  
  <pre><code>//This is not working btw
  
  $test = $this-&gt;validate($request, [
      'name' =&gt; 'required|min:2|max:255'
  ]);
  
  if( $test )
  { //Ok }
  else
  { //Not okay };
  </code></pre>