laravel-cross-eloquent-search
laravel-cross-eloquent-search copied to clipboard
Using orWhereRaw
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?
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.