如何在两个字段中使用Laravel whereNotIn

如何在两个字段中使用Laravel whereNotIn,laravel,laravel-4,Laravel,Laravel 4,我使用Laravel whereNotIn来排除一些项目id,为此,首先我创建了如下排除项目id数组 $doNotDisplayThisProjectsIds=array4,6,20 并使用此查询排除此项目: Project::whereNotIn('prject_id', $doNotDisplayThisProjectsIds)->get(); 现在我也想更改项目状态。启用-1,禁用-0,所以我想筛选状态-1结果集,如何做到这一点?请帮帮我,我找到了一个 Project::wher

我使用Laravel whereNotIn来排除一些项目id,为此,首先我创建了如下排除项目id数组

$doNotDisplayThisProjectsIds=array4,6,20

并使用此查询排除此项目:

Project::whereNotIn('prject_id', $doNotDisplayThisProjectsIds)->get(); 
现在我也想更改项目状态。启用-1,禁用-0,所以我想筛选状态-1结果集,如何做到这一点?请帮帮我,我找到了一个

Project::whereNotIn('prject_id', $doNotDisplayThisProjectsIds)
                                ->where('status','=' , 1)
                                ->get();
查询生成器:

DB::table(..)->select(..)->whereNotIn('prject_id', $doNotDisplayThisProjectsIds)->get();
雄辩的:

SomeModel::select(..)->whereNotIn('prject_id', $doNotDisplayThisProjectsIds)->get();