eloquent whereraw

Solutions on MaxInterview for eloquent whereraw by the best coders in the world

showing results for - "eloquent whereraw"
Élie
17 Feb 2018
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    )");