title: Laravel Eloquent Compare Column Values
body: <p>Eloquent's <code>where()</code> seems not working when comparing two column values. How to fix it?</p>
  
  <p>Sample code:</p>
  
  <pre><code>-&gt;where('table_1.name', '=', 'table_2.name')
  </code></pre>
  
  <p>But works on:</p>
  
  <pre><code>-&gt;where('table_1.name', '=', 'john')
  </code></pre>