title: Laravel: Method Illuminate\Http\Request::validate does not exist in AuthenticatesUsers.php line 68
body: <pre><code>Laravel: v5.7.28
  Voyager: v1.2.0
  PHP: 7.2
  Database: MySQL 8.0
  </code></pre>
  
  <p>I setup Voyager Admin Panel on my Laravel E-commerce.
  When I try to login, I see an error:</p>
  
  <blockquote>
    <p>(1/1) BadMethodCallException Method Illuminate\Http\Request::validate
    does not exist.</p>
  </blockquote>
  
  <p>Stack:</p>
  
  <pre><code>--
  in Macroable.php line 100
  at Request-&gt;__call('validate', array(array('email' =&gt; 'required\|string', 'password' =&gt; 'required\|string')))in AuthenticatesUsers.php line 68
  at VoyagerAuthController-&gt;validateLogin(object(Request))in VoyagerAuthController.php line 24
  at VoyagerAuthController-&gt;postLogin(object(Request))
  at call_user_func_array(array(object(VoyagerAuthController), 'postLogin'), array(object(Request)))in Controller.php line 54
  at Controller-&gt;callAction('postLogin', array(object(Request)))in ControllerDispatcher.php line 45
  at ControllerDispatcher-&gt;dispatch(object(Route), object(VoyagerAuthController), 'postLogin')in Route.php line 219
  at Route-&gt;runController()in Route.php line 176
  at Route-&gt;run()in Router.php line 682
  at Router-&gt;Illuminate\Routing\{closure}(object(Request))in Pipeline.php line 30
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request))in SubstituteBindings.php line 41
  at SubstituteBindings-&gt;handle(object(Request), object(Closure))in Pipeline.php line 163
  at Pipeline-&gt;Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 53
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request))in VerifyCsrfToken.php line 75
  at VerifyCsrfToken-&gt;handle(object(Request), object(Closure))in Pipeline.php line 163
  at Pipeline-&gt;Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 53
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request))in ShareErrorsFromSession.php line 49
  at ShareErrorsFromSession-&gt;handle(object(Request), object(Closure))in Pipeline.php line 163
  at Pipeline-&gt;Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 53
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request))in StartSession.php line 63
  at StartSession-&gt;handle(object(Request), object(Closure))in Pipeline.php line 163
  at Pipeline-&gt;Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 53
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request))in AddQueuedCookiesToResponse.php line 37
  at AddQueuedCookiesToResponse-&gt;handle(object(Request), object(Closure))in Pipeline.php line 163
  at Pipeline-&gt;Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 53
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request))in EncryptCookies.php line 66
  at EncryptCookies-&gt;handle(object(Request), object(Closure))in Pipeline.php line 163
  at Pipeline-&gt;Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 53
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request))in Pipeline.php line 104
  at Pipeline-&gt;then(object(Closure))in Router.php line 684
  at Router-&gt;runRouteWithinStack(object(Route), object(Request))in Router.php line 659
  at Router-&gt;runRoute(object(Request), object(Route))in Router.php line 625
  at Router-&gt;dispatchToRoute(object(Request))in Router.php line 614
  at Router-&gt;dispatch(object(Request))in Kernel.php line 176
  at Kernel-&gt;Illuminate\Foundation\Http\{closure}(object(Request))in Pipeline.php line 30
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request))in InjectDebugbar.php line 65
  at InjectDebugbar-&gt;handle(object(Request), object(Closure))in Pipeline.php line 163
  at Pipeline-&gt;Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 53
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request))in CheckForMaintenanceMode.php line 62
  at CheckForMaintenanceMode-&gt;handle(object(Request), object(Closure))in Pipeline.php line 163
  at Pipeline-&gt;Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 53
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request))in Pipeline.php line 104
  at Pipeline-&gt;then(object(Closure))in Kernel.php line 151
  at Kernel-&gt;sendRequestThroughRouter(object(Request))in Kernel.php line 116
  at Kernel-&gt;handle(object(Request))in index.php line 55
  </code></pre>
  
  <p>Error in Laravel <a href="https://github.com/laravel/framework/blob/6.x/src/Illuminate/Foundation/Auth/AuthenticatesUsers.php#L67" rel="nofollow noreferrer">https://github.com/laravel/framework/blob/6.x/src/Illuminate/Foundation/Auth/AuthenticatesUsers.php#L67</a></p>
  
  <pre><code>protected function validateLogin(Request $request)
      {
          $request-&gt;validate([
              $this-&gt;username() =&gt; 'required|string',
              'password' =&gt; 'required|string',
          ]);
      }
  </code></pre>
  
  <p>I check the documentation <a href="https://laravel.com/docs/5.7/validation" rel="nofollow noreferrer">https://laravel.com/docs/5.7/validation</a> and it's correct code.
  Please help, why doesn't it work?</p>