title: QueryException SQLSTATE[42S22]: Column not found: 1054 Unknown column 'customers.id' in 'where clause'
body: <p>I want to Edit my data in laravel system, which has a customer_id as an increment key. 
  But the error says,  </p>
  
  <blockquote>
    <p>Illuminate \ Database \ QueryException (42S22) SQLSTATE[42S22]: Column
    not found: 1054 Unknown column 'customers.id' in 'where clause' (SQL:
    select * from <code>customers</code> where <code>customers</code>.<code>id</code> = 4 limit 1)</p>
  </blockquote>
  
  <p>Previous exceptions</p>
  
  <blockquote>
    <p>SQLSTATE[42S22]: Column not found: 1054 Unknown column 'customers.id'
    in 'where clause' (42S22)</p>
  </blockquote>
  
  <p>I don't understand why.</p>
  
  <p>I've tried to add protected primarykey is customer_id in my model.
  but the result is the same like before.</p>
  
  <p>This is my Controller</p>
  
  <pre><code>    {
          $customer = \App\Customer_Model::find($customer_id);
          $customer-&gt;delete();
          return redirect('/customers')-&gt;with('sukses', 'Users has been deleted!');
      }
  </code></pre>
  
  <p>This is my model</p>
  
  <pre><code>
  namespace App;
  
  use Illuminate\Database\Eloquent\Model;
  
  class Customer_Model extends Model
  {
      protected $table = 'customers';
      protected $primarykey = 'customer_id';
      protected $fillable = ['customer_id', 'customer_code', 'customer_name', 'email', 'phone', 'contact_person', 'address', 'user_id', 'created_by', 'updated_by', 'void'];
  }```
  
  This is my view
  ```&lt;tbody&gt;
                        @foreach($data_customer as $cust)
                          &lt;tr&gt;
                          &lt;td&gt;{{$cust-&gt;customer_code}}&lt;/td&gt;
                          &lt;td&gt;{{$cust-&gt;customer_name}}&lt;/td&gt;
                          &lt;td&gt;{{$cust-&gt;email}}&lt;/td&gt;
                          &lt;td&gt;{{$cust-&gt;phone}}&lt;/td&gt;
                          &lt;td&gt;{{$cust-&gt;contact_person}}&lt;/td&gt;
                          &lt;td&gt;{{$cust-&gt;address}}&lt;/td&gt;
                          &lt;td&gt;&lt;a href="/customers/{{$cust-&gt;customer_id}}/edit" class="btn btn-warning"&gt;&lt;span class="icon-settings icons icon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;a href="/customers/{{$cust-&gt;customer_id}}/delete" class="btn btn-danger"&gt;&lt;span class="icon-trash icons icon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;
                          &lt;/tr&gt;
                          @endforeach
                        &lt;/tbody&gt;```
  </code></pre>