1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-21 11:18:10 +08:00
course-tencent-cloud/app/Http/Api/Controllers/ImGroupController.php
koogua 0336a54911 1.源文件增加版权信息
2.群组状态和课程协同
2021-06-13 15:49:47 +08:00

57 lines
1.2 KiB
PHP

<?php
/**
* @copyright Copyright (c) 2021 深圳市酷瓜软件有限公司
* @license https://opensource.org/licenses/GPL-2.0
* @link https://www.koogua.com
*/
namespace App\Http\Api\Controllers;
use App\Services\Logic\Im\GroupInfo as GroupInfoService;
use App\Services\Logic\Im\GroupList as GroupListService;
use App\Services\Logic\Im\GroupUserList as GroupUserListService;
/**
* @RoutePrefix("/api/im/group")
*/
class ImGroupController extends Controller
{
/**
* @Get("/list", name="api.im_group.list")
*/
public function listAction()
{
$service = new GroupListService();
$pager = $service->handle();
return $this->jsonSuccess(['pager' => $pager]);
}
/**
* @Get("/{id:[0-9]+}/info", name="api.im_group.info")
*/
public function infoAction($id)
{
$service = new GroupInfoService();
$group = $service->handle($id);
return $this->jsonSuccess(['group' => $group]);
}
/**
* @Get("/{id:[0-9]+}/users", name="api.im_group.users")
*/
public function usersAction($id)
{
$service = new GroupUserListService();
$pager = $service->handle($id);
return $this->jsonSuccess(['pager' => $pager]);
}
}