标签:desc fun order cts _id size HERE fir function
$product = $product->where(‘uuid‘, $uuid)->firstOrFail();
$affiliators = $affiliator->with([
‘affiliatorProducts‘ => function($query) use($product) {
$query->where(‘product_id‘, $product->id);
}])
->orderBy(‘id‘, ‘desc‘)
->paginate($pageSize, null, null, $currentPage);
标签:desc fun order cts _id size HERE fir function
原文地址:https://www.cnblogs.com/fengliang/p/9167140.html