select * from table_name where field1 = 'abc' or field2 in ('123','456',....)
이런식의 쿼리를 하고 싶은데 엘로퀀트에서 orwhere와 wherein을 합친 함수는 없을까요?
이렇게 하면 되지 않을까요?
DB::table('foo')->where('field1, 'abc')->orWhere(function ($query) { $query->whereIn('field2', ['123', '456']); })->get();
답변 감사합니다 ^^
그렇게 하니까 잘 되네요 ㅎㅎ
select * from table_name where field1 = 'abc' or field2 in ('123','456',....)
이런식의 쿼리를 하고 싶은데 엘로퀀트에서 orwhere와 wherein을 합친 함수는 없을까요?