Как в Laravel передать массив условий в whereIn?
//Все заказы юзера
$orders = Auth::user()->orders;
//Выборка всех продуктов из всех заказов юзера
$products = DB::table('products')
        ->join('order_product', function ($join) {
            $join->on('products.id', '=', 'order_product.product_id')
       ->whereIn('order_product.order_id', $orders);
        })
        ->get();
Переменную $orders  вносил в разном виде : array($orders->id );  [$orders->id ] ;  через foreach проганял.
Такой ответ  - Argument 1 passed to Illuminate\Database\Query\Builder::cleanBindings() must be of the type array, string given.
Если массив указан в виде как ниже , запрос работает.
->whereIn('order_product.order_id', [12,23,24,56]);