1$orders = DB::table('orders')
2 ->whereRaw('price > IF(state = "TX", ?, 100)', [200])
3 ->get();
4
5#To use in search
6$paciente = $query->whereRaw("(
7 LOWER(name) like '%". strtolower($search) ."%' OR
8 LOWER(sku) like '%". strtolower($search) ."%' OR
9 LOWER(codigo) like '%". strtolower($search) ."%' OR
10 LOWER(descricao_curta) like '%". strtolower($search) ."%'
11 )");