Laravel 5 update without id
<p>I have a problem in Laravel 5. When I update a record in database, I get error <code>Unknown column 'id' in 'where clause'</code>. In the controller, I use WHERE clause to get the record I want to update. My primary key is not id and the type is bigInteger. I've tried adding <code>protected $primaryKey</code> in the model but it doesn't work for bigInteger. Is there any way to use my own primary key instead of using id?</p>

<p>Controller</p>

<pre><code>$item = Item::where('item_id','=',$item_id)-&gt;first();
$item.name = $name;
$item.type = $type;
$item.save();
</code></pre>