1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-22 19:44:02 +08:00
koogua cbc2e5762a !11 阶段性合并
* 根据app需要作出相应调整
* 路由增加命名name,增加app应用管理
* 完成基本API,增加h5和小程序支付定义
2020-11-10 10:25:16 +08:00

43 lines
971 B
PHP

<?php
namespace App\Services\Logic\Im;
use App\Repos\User as UserRepo;
use App\Services\Logic\ImGroupTrait;
use App\Services\Logic\Service;
class GroupInfo extends Service
{
use ImGroupTrait;
public function handle($id)
{
$group = $this->checkGroup($id);
$userRepo = new UserRepo();
$owner = $userRepo->findById($group->owner_id);
return [
'id' => $group->id,
'type' => $group->type,
'name' => $group->name,
'avatar' => $group->avatar,
'about' => $group->about,
'user_count' => $group->user_count,
'msg_count' => $group->msg_count,
'owner' => [
'id' => $owner->id,
'name' => $owner->name,
'avatar' => $owner->avatar,
'title' => $owner->title,
'about' => $owner->about,
'vip' => $owner->vip,
],
];
}
}