Laravel insert or update multiple rows
<p>Im new in laravel, and im trying to update my navigation tree.
So i want to update my whole tree in one query without foreach.</p>

<pre><code>array(
  array('id'=&gt;1, 'name'=&gt;'some navigation point', 'parent'='0'),
  array('id'=&gt;2, 'name'=&gt;'some navigation point', 'parent'='1'),
  array('id'=&gt;3, 'name'=&gt;'some navigation point', 'parent'='1')
);
</code></pre>

<p>I just want to ask - is there posibility in laravel to insert(if new in array) or update my current rows in database?</p>

<p>I want to update all, because i have fields _lft, _right, parent_id in my tree and im using some dragable js plugin to set my navigation structure - and now i want to save it.</p>

<p>I tried to use</p>

<pre><code>Navigation::updateOrCreate(array(array('id' =&gt; '3'), array('id'=&gt;'4')), array(array('name' =&gt; 'test11'), array('name' =&gt; 'test22')));
</code></pre>

<p>But it works just for single row, not multiple like i tried to do.
Maybe there is another way to do it?</p>