Reputation: 63
How can I get all data where "status" is "null" or "status" is "z" in one query?
Table columns: id, content, status
$pitanja = KartonPitanja::whereNull("pol")->where("pol","z")->get();
Upvotes: 1
Views: 269
Reputation: 187
use orWhere like this
$pitanja = KartonPitanja::whereNull("pol")->orWhere("pol","z")->get();
Upvotes: 3