title: How to write where without fieldname in laravel ORM query
body: <p>The given sql query is working fine (<strong>update</strong> : please check the full query).</p>
  
  <pre><code>SELECT * FROM items where (
      select if((select count(*) from item_offers where (some_id_field = items.id or other_id_field = items.id) &lt;= 0, true, false)
  ); 
  </code></pre>
  
  <p><strong>full query:</strong></p>
  
  <pre><code>SELECT * FROM items where (
      select if(
          (select count(*) from item_offers where (item_offers.listed_item_id = items.id or item_offers.offer_item_id = items.id) and (item_offers.accepted_at is not null and item_offers.cancelled_at is null))&lt;= 0
      , true, false)
  );
  </code></pre>
  
  <p>The condition is that, on the second table, If I find positive (one or more) row count, where i find the items id, then, i should not return the result from items table.</p>
  
  <p>i want to write something like this in laravel query:</p>
  
  <pre><code>Item::where(condition is true)-&gt;get()
  </code></pre>
  
  <p>i have tried using where, whereRaw and all possible combination i could find in the documentation. is there a way to write where without fieldname.</p>
  
  <p><strong>conclusion :</strong> </p>
  
  <blockquote>
    <p>please check the second answer by @M Khalid Junaid. which is the accepted answer.</p>
  </blockquote>