Reputation: 9047
I'm using this one
$notification = notification::where('department', '=', 1)->get();
to fetch all records that has 'department' of 1 in my database (it works)
Now, I want to fetch also all records that neither has 'department' of 1 or 0, any ideas, help?
Upvotes: 0
Views: 46
Reputation: 14747
How about using whereIn
or whereNotIn
clauses?
$notification = notification::whereIn('department', [1, 2])->get();
Upvotes: 2