update in the Standard

Asked

Viewed 59 times

0

good afternoon to all!!! I put together the form, which will be sent to the "update" method

public function update(Request $r, Voluntarios $vol)
  {   
      $up = $vol->update($r->all());
      var_dump($up);
  }

only that it returns false, without saving...what is wrong ?? I’m still learning, and I’m a little lost yet... Thank you all!! Horatio

1 answer

0

Modify the code as below:


public function update(Request $r, Voluntarios $vol)
  {   
      $up = $vol->fill($r->all());
      $vol->save();
      var_dump($up);
  }

Browser other questions tagged

You are not signed in. Login or sign up in order to post.