+1
How to add multiple AND conditions in laravel query?
Can some body tell me the answers for how to add multiple AND conditions in laravel query?
Thêm một bình luận
2 CÂU TRẢ LỜI
0
You can use sub-queries in anonymous function like this:
$results = User::where('this', '=', 1) ->where('that', '=', 1) ->where(function($query) { /** @var $query Illuminate\Database\Query\Builder */ return $query->where('this_too', 'LIKE', '%fake%') ->orWhere('that_too', '=', 1); }) ->get();
Thanks Dao.