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
Did you test whereRaw()?
so your function should look like:
function scopeIsFeaturedOrIsBlogPost($query) { return $query->whereRaw('( isFeatured = "true" OR type = "blogPost" )'); }
ps. this is untested