title: Laravel 5.4 - Update an existing record
body: <p>I'm struggling to update an existing record through an Eloquent Model in Laravel 5.4</p>
  
  <p>I have for creating a record that works perfectly fine, I took it and modified it to try and update the record:</p>
  
  <pre><code>public function commitEdit ($char_edit_id) 
      {
  
  
      $edited_character = \DB::table('characters')-&gt;where('char_id', $char_edit_id)-&gt;first();
  
  
      $edited_character-&gt;campaign_id = 1;
  
      $edited_character-&gt;character_name = request('characterName');
  
      $edited_character-&gt;Race = request('race');
  
      $edited_character-&gt;Sub_Race = request('subRaceField');
  
      $edited_character-&gt;Class = request('class');
  
      $edited_character-&gt;Level = request('level');
  
      $edited_character-&gt;Strength = request('strength');
  
      $edited_character-&gt;Dexterity = request('dexterity');
  
      $edited_character-&gt;Constitution = request('constitution');
  
      $edited_character-&gt;Intelligence = request('intelligence');
  
      $edited_character-&gt;Wisdom = request('wisdom');
  
      $edited_character-&gt;Charisma = request('charisma');
  
      $levelVar = request('level');
  
      if ($levelVar &gt;= 4) {
      $edited_character-&gt;Proficiency = 2;
      } else if ($levelVar &gt;= 8) {
      $edited_character-&gt;Proficiency = 3;
      }
  
  
      $edited_character-&gt;Trained_Skills = request('skillsField');
  
      $edited_character-&gt;Languages = request('languagesField');
  
  
      $edited_character-&gt;Hit_Die = 1;
  
      $edited_character-&gt;max_HP = request('max-hp');
  
      $edited_character-&gt;Alignment = request('alignment');
  
      $edited_character-&gt;Armor_Class = request('armor-class');
  
      $edited_character-&gt;Initiative = request('initiative');
  
      $edited_character-&gt;Speed = request('speed');
  
      $edited_character-&gt;Background = request('background');
  
  
  
      $edited_character-&gt;update();
  
      return redirect('./characters');
  </code></pre>
  
  <p>That gives this error:
  Call to undefined method stdClass::update()</p>
  
  <p>I have tried using save() but I get the same error with save() instead of update()</p>
  
  <p>Thanks in advance c:</p>