Eloquent Using multiple whereNotIn

Posted 1 year ago by eddieace

I'm trying to make a query where I use multiple whereNotIn arrays. For some reason, they block each other and ignores the other query parameters.

Any clues on how to solve this?

$products = Products::orderBy('id','DESC')
    ->where('status', '=', 4)
    ->whereNotIn('category', $excluded)
    ->whereNotIn('location', ['New York', 'Boston', 'Washington, DC', 'Charlotte'])

Please sign in or create an account to participate in this conversation.