title: Find two column in laravel which have equal values via Eloquent?
body: <p>I am working on a project where I have a table market which has a buyer_id column and a seller_id column. When a seller puts something on the market, the seller_id and buyer_id are the same which means that the product is for sale right now. After the sale, the buyer_id changes to whoever bought the product.</p>
  
  <p>Now the place in my application where I am showing all the products up for sale I am doing this query via Eloquent: </p>
  
  <pre><code>$market_records = Market::where('seller_id', '!=', Auth::user()-&gt;id)-&gt;where('seller_id', '=', 'buyer_id')-&gt;get();
  </code></pre>
  
  <p>I want only the products up for sale which are not by the same user who has logged in and I want to have only those products where the seller_id and buyer_id is same. Now the problem in the second <code>where</code> statement is that the that it is comparing the seller_id to the string <code>'buyer_id'</code> which is not what I want. What is way with which I can only fetch the records where the buyer_id is equal to the <code>seller_id</code>.</p>