applyConditions
This commit is contained in:
parent
2a46e58e23
commit
0d7b480f9f
@ -26,8 +26,9 @@ class OrderRepository extends Repository
|
|||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $fieldSearchable = [
|
protected $fieldSearchable = [
|
||||||
'id' => '=',
|
'id' => '=',
|
||||||
'created_at' => 'like',
|
'sn' => 'like',
|
||||||
|
'package.name' => 'like',
|
||||||
];
|
];
|
||||||
|
|
||||||
public function model()
|
public function model()
|
||||||
|
@ -38,7 +38,7 @@ class OrderService extends Service
|
|||||||
$limit = $conditions['limit'] ?? 35;
|
$limit = $conditions['limit'] ?? 35;
|
||||||
|
|
||||||
$res = $this->orderRepository->with(['company:id,name','package:id,name,carrier_operator'])
|
$res = $this->orderRepository->with(['company:id,name','package:id,name,carrier_operator'])
|
||||||
->withConditions($conditions)->orderBy('order_at', 'desc')->paginate($limit);
|
->withConditions($conditions)->applyConditions()->orderBy('order_at', 'desc')->paginate($limit);
|
||||||
|
|
||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user