Answer the question
In order to leave comments, you need to log in
How to force whereRaw in Laravel not to quote variables?
$v = 'test';
$query->whereRaw('(`column_name` RLIKE "?" ...)', [$v]);
$v = "test";
$v = DB::connection()->getPdo()->quote($v);
$query->whereRaw('(`column_name` RLIKE ? ...)', [$v]);
$v = 'test';
$v = DB::connection()->getPdo()->quote($v);
$query->whereRaw('(`column_name` RLIKE ' . $v . ' ...)', []);
Answer the question
In order to leave comments, you need to log in
hand-face
who in general showed the child whereRaw who this bad pervert uncle is?
$v = 'test';
$query->where('column_name', 'RLIKE', "{$v}");
Well, do I understand correctly that out of the box what I want is not and I need to write my own trait?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question