where or where in laravel code example
Example 1: or where in orm laravel
$a='foo', $b='bar', $c='john', $d='doe';
Coder::where(function ($query) use ($a, $b) {
$query->where('a', '=', $a)
->orWhere('b', '=', $b);
})->where(function ($query) use ($c, $d) {
$query->where('c', '=', $c)
->orWhere('d', '=', $d);
})->get();
Example 2: laravel where
$users = DB::table('users')
->whereDate('created_at', '2016-12-31')
->get();
Example 3: laravel where and where
Table::where('Column', Value)->where('NewColumn', Value)->get();