applyConditions
This commit is contained in:
parent
2a46e58e23
commit
0d7b480f9f
@ -27,7 +27,8 @@ class OrderRepository extends Repository
|
||||
*/
|
||||
protected $fieldSearchable = [
|
||||
'id' => '=',
|
||||
'created_at' => 'like',
|
||||
'sn' => 'like',
|
||||
'package.name' => 'like',
|
||||
];
|
||||
|
||||
public function model()
|
||||
|
@ -38,7 +38,7 @@ class OrderService extends Service
|
||||
$limit = $conditions['limit'] ?? 35;
|
||||
|
||||
$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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user