I'm looking for a way to translate a query tree object that may look like:
[Or => [And => [userid => 4,albumid =>23], And [.....] ,...]]
Into a laravel query
return $query->orWhere(function($query() {
return $query->where('userid', 4)
->where('albumid', 23);
} )->orWhere(.....)
I wanted to know if something like this exists before I reinvent the wheel....