|
@@ -29,7 +29,7 @@ class AgentController extends Controller
|
|
|
|
|
|
function index(Request $request) {
|
|
function index(Request $request) {
|
|
$search['keyword'] = $request->input('keyword');
|
|
$search['keyword'] = $request->input('keyword');
|
|
- $search['status'] = $request->input('status');
|
|
|
|
|
|
+ $search['status'] = $request->input('status') ?? -1;
|
|
$query = $this->repository->pushCriteria(new AgentWhere($search, $this->getStoreId()));
|
|
$query = $this->repository->pushCriteria(new AgentWhere($search, $this->getStoreId()));
|
|
|
|
|
|
if(isset($request['sort_field']) && $request['sort_field'] && isset($request['sort_field_by'])) {
|
|
if(isset($request['sort_field']) && $request['sort_field'] && isset($request['sort_field_by'])) {
|
|
@@ -38,7 +38,7 @@ class AgentController extends Controller
|
|
$query = $query->pushCriteria(new OrderBy('id','DESC'));
|
|
$query = $query->pushCriteria(new OrderBy('id','DESC'));
|
|
}
|
|
}
|
|
$list = $query->paginate();
|
|
$list = $query->paginate();
|
|
- dd($list);
|
|
|
|
|
|
+ // dd($list);
|
|
foreach ($list as $item){
|
|
foreach ($list as $item){
|
|
$product = AlbumProductPriceModel::where([['agent_id',$item->id],['store_id',$this->getStoreId()]])->first();
|
|
$product = AlbumProductPriceModel::where([['agent_id',$item->id],['store_id',$this->getStoreId()]])->first();
|
|
if(!empty($product)){
|
|
if(!empty($product)){
|