title: Case-sensitive where statement in laravel
body: <p>How can I do a case-sensitive string match with laravel?</p>
  
  <hr>
  
  <p><code>SELECT * FROM `invites` WHERE `token`='OGwie2e2985tOEGewgu23hUFs'</code></p>
  
  <p>Can be done as </p>
  
  <p><code>Invite::where('token',$token)-&gt;first()</code></p>
  
  <hr>
  
  <p>If I want a case-sensitive match I need to use a statement like this (or similar, as far as I know):</p>
  
  <p><code>SELECT * FROM `invites` WHERE BINARY `token`='OGwie2e2985tOEGewgu23hUFs'</code></p>
  
  <p>My best guess would be:</p>
  
  <p><code>Invite::whereRaw("BINARY `token`='{$token}'")-&gt;first()</code></p>
  
  <p>but then my input is not going through a prepared statement, right?</p>