column('id'); } else { $umid = UserMiningMachine::where('uid', $where['uid'])->column('id'); } $model = $model->where('umid', 'in', $umid); } if (isset($where['type']) && $where['type']) $model = $model->where('get_money_type', $where['type']); $model = $model->order('id desc'); $data = ($data = $model->page((int)$where['page'], (int)$where['limit'])->select()->each(function ($item) { $item['user_machine'] = UserMiningMachine::get($item['umid']); $item['machine'] = MiningMachine::get($item['user_machine']['mid']); })) && count($data) ? $data->toArray() : []; $count = $model->count(); return compact('count', 'data'); } }