0

Location モデルに次の関係があります。

public function special_users() {
    return $this->users()
    ->where('type_id', '=', '2')
    ->orWhere('type_id', '=', 'null');
}

しかし、私が欲しいのは、type_id = 2 のユーザーと、type_id = 2 のこの場所にユーザーがいない場合にのみ、type_id = null のユーザーです。

これは可能ですか?

4

2 に答える 2