How to combine WHERE clauses in Eloquent

前端 未结 5 1008
轻奢々
轻奢々 2021-01-13 15:27

I would like to have this kind of query in Eloquent:

SELECT * FROM table WHERE status = 1 AND (type = 2 OR type = 3 OR type = 4)

I\'ve been

5条回答
  •  独厮守ぢ
    2021-01-13 16:03

    You may run a raw query and type exactly what you want: See: https://laravel.com/docs/5.2/database#running-queries

提交回复
热议问题