title: Updating a row in Laravel 5.7 doesn't work, how do I fix it?
body: <p>I'm trying to update a row in mysql table. However, when I click the <strong>register button</strong>, it doesn't do anything. I'm using Laravel.</p>
  
  <p>Here's my <code>update</code> function:</p>
  
  <pre><code>public function update(Request $request)
  {
      $idpawn = $request['idprestamo'];
      $paynumber = $request['numeropago'];
      $payqty = $request['payqty'];
      $statuspawns = statuspawns::find($idpawn,$paynumber);
      $updateqty = $statuspawns-&gt;totalpayment - $payqty;
  
      if($updateqty  == "0"){
          $status = "Pay";
      }
      else{
          $status = "Partial Payment";
      }
  
      $statuspawns-&gt;total = $updateqty;
      $statuspawns-&gt;status = $status;
      $statuspawns-&gt;save();
  
      return redirect()-&gt;back();
  }
  </code></pre>
  
  <p>Thanks for your help.</p>