Example #1
0
 /**
  * get user id list
  *
  * @param string $targetId target id
  * @param int    $limit    limit
  * @return array
  */
 public function getUserIds($targetId, $limit = 5)
 {
     $wheres = ['targetId' => $targetId, 'counterName' => $this->name, 'counterOption' => $this->option];
     $orders = ['createdAt' => 'desc'];
     return $this->repo->fetchByUserIds($wheres, $orders, $limit);
 }