title: ON DUPLICATE KEY UPDATE Query in Laravel4
body: <p>How do I transform this </p>
  
  <pre><code>DB::table('partners')-&gt;insert(array($data));
  </code></pre>
  
  <p>laravel Query to have <code>ON DUPLICATE KEY UPDATE</code></p>
  
  <p>the structure look like</p>
  
  <pre><code>$data['program_name'] = $program['program']['_'];
  $data['program_id'] = $program_id;
  $data['status'] = $program['status'];
  $data['shop_name'] = $shop-&gt;name;
  $data['shop_logo'] = $shop-&gt;image;
  $data['shop_description'] = $shop-&gt;description;
  </code></pre>
  
  <p>where <code>program_id</code> is unique             </p>