title: AJAX Laravel Update Database
body: <p>My issue is that I'm doing a simple AJAX Post to update a database record, but I'm not getting any error and it's still not updating the record. What am I overlooking?</p>
  
  <p>Thanks!</p>
  
  <p>JS:</p>
  
  <pre><code>$.ajaxSetup({
          headers: {
              'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content')
          }
  }); 
  
  if ($('.abc-status').css('display') == 'block')
  {
      abc.api({method: 'user'}, function(error, user) {
  
          var userId = $('.oath_id').text();  
          var username = user.display_name;
          console.log(username);
          $.ajax({
  
              type: "POST",
              url: "oauth_authorization/abc/"+username,
              data: {abc_username: username},
              error: function(data){
                  console.log(data);
              }
          });
      });
  }
  </code></pre>
  
  <p>Controller:</p>
  
  <pre><code>public function postabcOAuth(Request $request, $username)
  {
      Auth::user()-&gt;update([
          'abc_username' =&gt; $username,
      ]); 
  }
  </code></pre>
  
  <p>Route:</p>
  
  <pre><code>Route::post('/oauth_authorization/abc/{username}', [
      'uses' =&gt; '\abc\Http\Controllers\OAuthController@postAbcOAuth',
      'middleware' =&gt; ['auth'],
  ]);
  </code></pre>