title: Laravel: Editing one-to-many relationship fields
body: <p>I have a table structure similar to this:</p>
  
  <pre>
  id   name   superpower
   1     A      speed
   2     A      stamina
   3     B      speed
   4     C      power
   5     B      power
   6     D      sarcasm
  </pre>
  
  <p>Name has a one-to-many relationship to Superpower. To edit these fields, the front-end form returns an array of superpowers for the name. I.e., the 'edit A' form could return <code>['speed','power']</code> (removing stamina and adding power).</p>
  
  <p>An easy way to do this with pure PHP is to remove all superpowers of the name and add the new ones. What is the best way to do this in Laravel?</p>