где в нескольких столбцах - PullRequest
1 голос
/ 24 июня 2019

Я ищу путь laravel для этого запроса:

select * from `table` 
where (product_id, request_id) NOT IN ((66, 10),(76,23))

Возможно, что-то вроде:

$ids = =array(
    ['66', '10'],
    ['76', '23']
)
DB::table('table')->whereNotInMultiple(['product_id', 'request_id'], $ids)->get();

Как мне это сделать в Laravel?

1 Ответ

1 голос
/ 24 июня 2019
DB::table('table')->whereNotIn('product_id', ['66','10'])
->whereNotIn('request_id', ['76', '23'])->get();
...