laravel中使用whereRaw需要注意sql注入,需要使用占位符?来解决该问题 $query->whereRaw("(concat(IFNULL(`title`,'')) like ?)", ['%test%']);