I would like to have this kind of query in Eloquent:
SELECT * FROM table WHERE status = 1 AND (type = 2 OR type = 3 OR type = 4)
I\'ve been
Eloquent allows nested parameter groupings passing a Closure as the argument of where, orWhere, or the undocumented but more expressive whereNested:
where
orWhere
whereNested
Table::where('status', 1) ->whereNested(function ($query) { $query->where('type', 2) ->orWhere('type', 3) ->orWhere('type', 4); });