|
|
@@ -57,12 +57,12 @@ class OrderPackageFilters
|
|
|
public function apply($builder)
|
|
|
{
|
|
|
$this->queryBuilder = $builder;
|
|
|
- $filters = array_filter($this->request->only($this->filters),function($item){
|
|
|
+ $filters = array_filter($this->request->only($this->filters), function ($item) {
|
|
|
return $item !== null;
|
|
|
});
|
|
|
$this->queryBuilder
|
|
|
- ->whereIn('status', [0,1,2,3,4,5,6,7,8,9,null])
|
|
|
- ->whereIn('exception_status', [0,1,2,3,4,5,6,7,null]);
|
|
|
+ ->whereIn('status', [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, null])
|
|
|
+ ->whereIn('exception_status', [0, 1, 2, 3, 4, 5, 6, 7, null]);
|
|
|
foreach ($filters as $filter => $value) {
|
|
|
if (method_exists($this, $filter)) {
|
|
|
$this->$filter($value, $this->queryBuilder);
|
|
|
@@ -104,7 +104,7 @@ class OrderPackageFilters
|
|
|
|
|
|
private function status($status)
|
|
|
{
|
|
|
- $statuses = array_filter(preg_split('/[,, ]+/is', $status),function($item){
|
|
|
+ $statuses = array_filter(preg_split('/[,, ]+/is', $status), function ($item) {
|
|
|
return $item !== null;
|
|
|
});
|
|
|
$this->queryBuilder->whereIn('status', $statuses);
|