title: Running "exists" queries in Laravel query builder
body: <p>I'm using MySQL and have a table of 9 million rows and would like to quickly check if a record (id) exists or not. </p>
  
  <p>Based on some research it seems the fastest way is the following sql:</p>
  
  <p><code>SELECT EXISTS(SELECT 1 FROM table1 WHERE id = 100)</code></p>
  
  <p>Source: <a href="https://stackoverflow.com/questions/1676551/best-way-to-test-if-a-row-exists-in-a-mysql-table">Best way to test if a row exists in a MySQL table</a></p>
  
  <p>How can I write this using Laravel's query builder?</p>