where([ ["mobile", '=', $mobile], ["is_delete", '=', 0] ])->find(); } public function findByPaginate(array $params) { $where = [ ['is_delete', '=', 0] ]; if(!is_null($params['store_id']) && $params['store_id'] > 0) array_push($where, ['store_id', '=', $params['store_id']]); return $this->where($where) ->order('create_time','desc') ->paginate(['list_rows'=> 10, "query" => $params]); } }