0
我用這一個取記錄等於1或0 laravel eloqouent
$notification = notification::where('department', '=', 1)->get();
獲取有1「部門」在我的數據庫中的所有記錄(它的工作原理)
現在,我還想獲取所有既不具有「部門」1或0,任何想法,幫助?
我用這一個取記錄等於1或0 laravel eloqouent
$notification = notification::where('department', '=', 1)->get();
獲取有1「部門」在我的數據庫中的所有記錄(它的工作原理)
現在,我還想獲取所有既不具有「部門」1或0,任何想法,幫助?
如何使用whereIn
或whereNotIn
子句?
$notification = notification::whereIn('department', [1, 2])->get();
你的天才!謝謝你的工作,像魅力:) –
很高興幫助你! – manix