In Eloquent, I\'d like to generate this query:
SELECT * FROM table WHERE a=1 AND ( b=2 OR c=3 );
But I seem to be generating this query instead
You can generate parentheses by passing a callback function to where().
where()
Model::where('a',1)->where(function($query) { $query->where('b', 2)->orWhere('c',3); })->get();