Мне нужны массивы, и мне нужно найти в них значения различий.
Вот мой код контроллера Laravel
Код: Выделить всё
$product_list = Operation::where('kvit_id', $kvit->id)->pluck('product_id')->toArray();
$hamkor_products = ListProduct::where('user_id', $newkvit->user_id)->pluck('product_id')->toArray();
$operProductList = array_diff($product_list, $hamkor_products);
dd($product_list, $hamkor_products, $operProductList);

What kind of mistake I made? $operProductList is returns []
Источник: https://stackoverflow.com/questions/692 ... flat-array