title: How to Properly Update Pivot table using added column as query?
body: <p>I have this pivot table containing</p>
  
  <p>imei status item_id</p>
  
  <p>and here is my code</p>
  
  <pre><code>  $update = Item::find($item_id)-&gt;workArea()-&gt;wherePivot('imei', '=', 3)-&gt;first(); 
    $update-&gt;pivot-&gt;status = 'Sold';
    $update-&gt;pivot-&gt;save();
  
  Before the function execute:
  IMEI     STATUS     ITEM-ID
  3        Available     3
  5        Available     3
  
  Result:
  IMEI     STATUS     ITEM-ID
  3        Sold          3
  3        Sold          3
  
  What I need:
  IMEI     STATUS     ITEM-ID
  3        Sold          3
  5        Available     3
  </code></pre>
  
  <p>Here's my relationship</p>
  
  <pre><code>public function workArea()
      {
         return $this-&gt;belongsToMany('WorkArea','item_work-area','item_id','work-area_id')-&gt;withPivot('imei','status');
      }
  </code></pre>
  
  <p>here are the past conversation with other artisan
  <a href="http://laravel.io/forum/07-08-2014-proper-chaining-for-my-pivot-table-to-execute-pivot-update" rel="nofollow">http://laravel.io/forum/07-08-2014-proper-chaining-for-my-pivot-table-to-execute-pivot-update</a></p>