Level 16
Hey,
Well you should be able to accomplish this easily by converting the = to != and AND to OR for values inside the brackets. Something like this:
$data = \DB::table('my_table')
->where('col1', 'value1')
->where('col2', 'value2')
->where(function ($q) {
$q->where('col3', '!=', 'value3')
->orWhere('col4', '!=', 'value4')
->orWhere('col5', '!=', 'value5')
})->get();
1 like