untymage
2 months ago
213
5
Laravel

Opposite of WherePivotIn

Posted 2 months ago by untymage

return !$this->tags()->wherePivotIn('type',
    [1, 2]
)->get();

I have external column in pivot table with name of type,

I want to determine (return boolean) if the relation Not have tags with type of 1 and 2, The above codes not working.

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