Laravel Eloquent and MySQL SOUNDS LIKE and different in Laravel request input() and get()
<p>I'm trying to implement some flexibility in my Laravel search query using MySQL SOUNDS LIKE function. My query with MySQL 'LIKE' function works fine and look like this.</p>

<pre><code>public function search(Request $request)
    {

        $search = $this-&gt;posts-&gt;where(function($query) use($request) {

                $keywords = $request-&gt;keywords;

                $keywords = explode(' ', $keywords);

                for($x = 0; $x &lt; count($keywords); $x++)
                {
                    $query-&gt;orWhere('title', 'LIKE', '%'.$keywords[$x].'%');
                    }
        })-&gt;orderBy('created_at', 'desc')-&gt;paginate(12);
.....
}
</code></pre>

<p>Than I try to add <code>'SOUNDS LIKE'</code> in my query:</p>

<pre><code>$query-&gt;orWhere('title', 'SOUNDS LIKE', '%'.$keywords[$x].'%');
</code></pre>

<p>But this doesn't work. Deosn't return any results. What I'm making wrong?</p>

<p>Also, in my function I'm using <code>$request-&gt;keywords</code> without <code>input()</code> or <code>get()</code>.</p>

<pre><code>$request-&gt;keywords;
$request-&gt;input('keywords');
$request-&gt;get('keywords');
</code></pre>

<p>Is my method insecure? What of this method is most secure?
I was wondering what is different in this few request method ant what is best solution?</p>