title: Why am I getting a 422 error code?
body: <p>I am making a POST request, but unable to get anything besides a 422 response.</p>
  
  <p><strong>Vue.js client code:</strong></p>
  
  <pre><code>new Vue({
    el: '#app',
  
    data: {
      form: {
        companyName: '',
        street: '',
        city: '',
        state: '',
        zip: '',
        contactName: '',
        phone: '',
        email: '',
        numberOfOffices: 0,
        numberOfEmployees: 0,
      }
    },
  
    methods: {
      register: function() {
        this.$http.post('/office-depot-register', this.form).then(function (response) {
  
          // success callback
          console.log(response);
  
        }, function (response) {
  
          // error callback
          console.log(response);
  
        });
      }
    }
  });
  </code></pre>
  
  <p><strong>Laravel Routes:</strong></p>
  
  <pre><code>Route::post('/office-depot-register', ['uses' =&gt; 'OfficeDepotController@register', 'as' =&gt; 'office-depot-register']);
  </code></pre>
  
  <p><strong>Laravel Controller:</strong></p>
  
  <pre><code>public function register(Request $request)
  {
      $this-&gt;validate($request, [
          'companyName' =&gt; 'required',
          // ...
      ]);
  
      // ...
  }
  </code></pre>