将列与数据数组进行比较


Compare column to an array of data

我一直在尝试在laravel中实现这样的东西,但到目前为止,它还不可能。

如果可能的话,请有人来帮忙。

->where("note_id","!=",array('1','2','3'))->first();

Thanks in advance

使用whereNotIn,如Query Builder文档中所述。

Model::whereNotIn('note_id', array(1, 2, 3))->first();