[英]fetch record that is equal to 1 or 0 laravel eloqouent
我正在用這個
$notification = notification::where('department', '=', 1)->get();
以獲取數據庫中“部門”為1的所有記錄(有效)
現在,我還想獲取所有沒有“部門”為1或0的記錄,有什么想法嗎?
如何使用whereIn
或whereNotIn
子句?
$notification = notification::whereIn('department', [1, 2])->get();
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.