下面這篇文章How to create multiple where clause query using Laravel Eloquent?Laravel收集多個where條件
我想插入多個 '和' 條件:
$matchThese = ['destination.country' => 'china', 'doc.description' => 'business'];
return $collection->where($matchThese);
但我收到此錯誤:
Too few arguments to function Illuminate\Support\Collection::where(), 1 passed . . . but two expected
那裏需要兩個參數,你也許可以做這樣的事情回報$收藏 - >在哪裏($ matchThese [0],$ matchThese [1]); – utdev