Laravel Eloquent where field is X or null

后端 未结 3 1981
长发绾君心
长发绾君心 2021-01-31 13:29

I have a table like this:

table
- field1: tinyint
- field2: varchar (nullable)
- datefield: timestamp (nullable)

Now I want to get all entries

3条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-31 13:56

    You could merge two queries together:

    $merged = $query_one->merge($query_two);
    

提交回复
热议问题