1
我在Laravel中很新,並且我已經分配了一個任務,僅向活動用戶發送通知。活動狀態由數據庫中名爲suspended
的列確定,該列是布爾值的tinyint。如何從數據庫中獲取所有未掛起的用戶,Laravel
我寫這個調用:
//Code here
$users = $asset->campaign->users();
$eagerly_users = $users
->where('suspended', false)
->with('preferences')
->get();
,但出於某種原因沒有返回正確的用戶。
嘗試使用「0」和「1」,而不是假 –
@RolandStarke 0像魅力一樣工作。謝謝! – Leon