title: Laravel normal login with vuejs using axios returns error Request failed with status code 422
body: <p>Am trying to use laravel and vue js with axios </p>
  
  <p>Previously this was my login form</p>
  
  <pre><code>&lt;form name="login-form" method="POST" action="{{ route('login') }}"&gt;
   //username and password fields
  
  &lt;/form&gt;
  </code></pre>
  
  <p>Which works perfectly one can login</p>
  
  <p>Now i would like to use vuejs in a similar way without making my app a single page app</p>
  
  <p>so i have resulted to making a login component</p>
  
  <pre><code> &lt;template&gt;
    &lt;form name="login-form"&gt;
      &lt;input type="email" v-model="email" class="form-control" autofocus&gt;
      &lt;input id="password" type="password" v-model="password"  required&gt;
  
       &lt;button type="submit"
               class="btn btn-dark btn-sm"
               @click.prevent="login" 
              :disabled="disableform"&gt;
              {{submitted?"Logging you in .....":"Login"}}
       &lt;/button&gt;
  
    &lt;/form&gt;
   &lt;/template&gt;
  </code></pre>
  
  <p>Now script part</p>
  
  <pre><code>  &lt;script&gt;
  
      export default {
        data: () =&gt; ({
           email :'', password:'', remeberme:true, submitted:false
        }),
      methods: {
      login() {
       //do other stuff like disabling buttons...etc
       axios.post("/login", {email:this.email, password:this.password})
          .then(
              (res)=&gt;{
  
                ///showing sweet alert then 
                // settimout for 3 sec the 
              window.location.href="/dashboard";
              },
              (err)=&gt;{
               //show sweet alert of failed login
              }
          )
  },
  </code></pre>
  
  <p>}</p>
  
  <p></p>
  
  <p>Now whenever i make the login post request an getting an error</p>
  
  <pre><code>Request failed with status code 422
  </code></pre>
  
  <p>I would like to proceed with the laravel vuejs workflow(with authentication sessions) but not an api jwt token request format.</p>
  
  <p>What could be wrong or is this possible?</p>