$orders = Order::get();
$orders = $orders->map(function ($order) use($orders) {
$order['cost_more'] = $orders->filter(function ($item) use($order) {
return $item['cost'] > $order->cost;
});
return $order;
});
$product->categories()
->find($category_id)
->delete();