laravel-cross-eloquent-search icon indicating copy to clipboard operation
laravel-cross-eloquent-search copied to clipboard

Using orWhereRaw

Open fabiobap opened this issue 3 years ago • 1 comments

I kinda need to search in some column that holds html stuff and I must search as

orWhereRaw('regexp_replace(description, "<[^>]*>", "") like ?', "%{$searchTerm}%")
->orWhereRaw('regexp_replace(description, "<[^>]*>", "") like ?', '%' . htmlentities($searchTerm) . '%');

is there any way to make it work?

fabiobap avatar Feb 02 '22 19:02 fabiobap

It probably wouldn't work because it expects the column argument to be a string. I'll check out if I can support DB::raw() statements.

pascalbaljet avatar Dec 12 '22 09:12 pascalbaljet