How to use array with LIKE with whereIn to retrieve eloquent rows in Laravel
<p>I have an array</p>

<pre><code>//dynamically generated. dynamic number of elements
$keywords = ['google', 'youlense'];
</code></pre>

<p>For a exactly matching values of <code>$keywork</code> mapping to row in content column, i can do following:</p>

<pre><code>$result = \App\Table::where(function($query){
    $query-&gt;whereIn('content', $keywords);
});
</code></pre>

<p>and the result would be somewhat</p>

<pre><code>select * from tables where content IN ('google', 'youlense');
</code></pre>

<p>but I want to use <code>LIKE</code> operator so the result may be like</p>

<pre><code>select * from tables where content LIKE ('%google%', '%youlense%');
</code></pre>

<p>I know that is not allowed in mysql but can some one recommend a simple and clean technique to handle this</p>