vendredi 25 mars 2016

Escape Laravel DB:raw query using Eloquent Where

How do I escape the following query in Laravel, using Eloquent:

$someCollection->where(DB::raw("CONCAT(`field1`, ' ', `field2`)"), 'LIKE', "%".$user_input."%");

I'm wondering if Eloquent's where method is escaping the $user_input parameter, even when using DB::raw like this. Any ideas?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1q6Azhz
via IFTTT

Aucun commentaire:

Enregistrer un commentaire