Add missing orderBy filter cont'd
This commit is contained in:
@@ -16,7 +16,7 @@ class TransactionOnlineBuilder extends Builder
|
||||
->when($request->filled('kodcaw'), fn($query) => $query->whereCawanganCode($request->kodcaw))
|
||||
->when($request->filled('status'), fn($query) => $query->whereStatus($request->status))
|
||||
->when($request->isNotFilled('status'), fn($query) => $query->whereStatus('PAID'))
|
||||
->when($request->filled('orderBy'), fn($query) => $query->orderBy($request->orderBy));
|
||||
->when($request->filled('orderBy'), fn($query) => $query->orderByColumn($request->orderBy));
|
||||
}
|
||||
|
||||
public function whereDatePaidBetween(Request $request): self
|
||||
@@ -42,7 +42,7 @@ class TransactionOnlineBuilder extends Builder
|
||||
return $this->where('status', $status);
|
||||
}
|
||||
|
||||
public function orderBy(string $orderBy): self
|
||||
public function orderByColumn(string $orderBy): self
|
||||
{
|
||||
return $this->orderBy($orderBy);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user