|
@@ -96,7 +96,7 @@ class UserService extends BaseService
|
|
|
public static function paginate(array $search = [], $order = 'desc', $by = 'created_at')
|
|
public static function paginate(array $search = [], $order = 'desc', $by = 'created_at')
|
|
|
{
|
|
{
|
|
|
$limit = isset($search['limit']) ? $search['limit'] : 15;
|
|
$limit = isset($search['limit']) ? $search['limit'] : 15;
|
|
|
- $query = static::$MODEL::with(['wallet'])
|
|
|
|
|
|
|
+ $query = static::$MODEL::with(['wallet','level'])
|
|
|
->join('wallets', 'users.member_id', '=', 'wallets.member_id')
|
|
->join('wallets', 'users.member_id', '=', 'wallets.member_id')
|
|
|
->where(self::getWhere($search));
|
|
->where(self::getWhere($search));
|
|
|
if ($by == 'available_balance') $by = "wallets.{$by}";
|
|
if ($by == 'available_balance') $by = "wallets.{$by}";
|