title: Laravel adding parameter with raw queries using Like operators and '%"
body: <p>I did some ways to assign parameter but it's not working</p>
  
  <p>Here is my code:</p>
  
  <pre><code>$sqlDefault = "Select * from histories as h where h.status like % :status %";
  
  return DB::select(DB::raw($sqlDefault), ['status' =&gt; $status]);
  </code></pre>
  
  <p>It's not working so I try another ways to assign:</p>
  
  <p><code>'%:status%'</code> or <code>'%':status'%'</code></p>
  
  <p>But it's not work</p>
  
  <p>Now I don't use parameter and it's worked perfectlly</p>
  
  <p><code>$sqlDefault = "Select * from histories as h where h.status like '%$status%'";</code></p>
  
  <p>The question is how I can use parameter when using like operator with "%" ?</p>