title: Why does using my primary key 'code_giac' for update my fields?
body: <p>This is my validation code in controller:</p>
  
  <pre><code>$request-&gt;validate([
              'libelle'=&gt; 'required|max:50|unique:giacs,libelle,'.$giac-&gt;code_giac,
              'specif'=&gt; 'required|max:50',
              'adlocal_1'=&gt; 'required|max:100',
              'adlocal_2'=&gt; 'required|max:100',
          ]);
  </code></pre>
  
  <p>I got this error:</p>
  
  <blockquote>
    <p>SQLSTATE[42S22]: Column not found: 1054 Unknown column 'id' in 'where clause' (SQL: select count(*) as aggregate from <code>giacs</code> where <code>libelle</code> = Giac translog and <code>id</code> &lt;> 1111)</p>
  </blockquote>
  
  <p>And I don't use <code>id</code> as a primary key</p>