标签: php laravel
尝试在Laravel 5.7中使用原始查询,但是下面的代码不起作用。如何使用LIKE %%将变量传递给此查询?
$user = DB::select(" SELECT * FROM `users` WHERE CONCAT_WS(' ', `firstname`, `lastname`) LIKE '%:search%' ", ['search'=>$request->search]);