/** * Get full names of liked repositories * @param string $cur_user_id - current user's ID * @param string $owner * @param string $name * @return array list */ public static function getLikedRepos($owner = '', $name = '') { $where = array('ghuser_id' => cur_gh_user_id); if ($owner && $name) { $where['owner'] = $owner; $where['name'] = $name; } $result = GhRepoModel::where($where)->get(); return array_column($result->toArray(), 'fullname'); }