title: Undefined property: App\Http\Controllers\PageController::$validate in Laravel
body: <p>I have controller with the action  </p>
  
  <pre><code>public function postContact(Request $request)
  {
  
      $this-&gt;validate($request, [
          'name'    =&gt; 'required',
          'email'   =&gt; 'required | email',
          'content' =&gt; 'required'
      ]);
      if(empty($this-&gt;validate-&gt;fails())){
          die('wrong');
           return redirect()-&gt;route('contact')-&gt;withInput();
     }
     return ('right');
  
  }
  </code></pre>
  
  <p>When I don't fill in all input this dies on the wrong statement, but when I fill in all the input this error occurs:</p>
  
  <blockquote>
    <p>ErrorException in PageController.php line 123:
    Undefined property: <code>App\Http\Controllers\PageController::$validate</code></p>
  </blockquote>
  
  <p>How can I fix this?
  Thank for reading my answer:
  <a href="https://i.stack.imgur.com/AOHDt.png" rel="nofollow noreferrer">Image</a></p>