update
This commit is contained in:
@@ -19,6 +19,7 @@ class ServiceClientRepository extends BaseApiRepository implements ServiceClient
|
||||
{
|
||||
$query = $this->model
|
||||
->with([
|
||||
'product',
|
||||
'invoice.order',
|
||||
'orderItem' => fn($q) => $q->with(['product', 'os.osGroup', 'order']),
|
||||
])
|
||||
@@ -27,7 +28,7 @@ class ServiceClientRepository extends BaseApiRepository implements ServiceClient
|
||||
->orderBy('started_at', 'desc');
|
||||
|
||||
if ($productType) {
|
||||
$query->whereHas('orderItem.product', function ($builder) use ($productType) {
|
||||
$query->whereHas('product', function ($builder) use ($productType) {
|
||||
$builder->where('product_type', $productType);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user