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

39 lines
735 B
PHP

<?php
namespace App\Http\Api\Controllers;
use App\Services\Logic\Help\HelpInfo as HelpInfoService;
use App\Services\Logic\Help\HelpList as HelpListService;
/**
* @RoutePrefix("/api/help")
*/
class HelpController extends Controller
{
/**
* @Get("/list", name="api.help.list")
*/
public function listAction()
{
$service = new HelpListService();
$helps = $service->handle();
return $this->jsonSuccess(['helps' => $helps]);
}
/**
* @Get("/{id:[0-9]+}", name="api.help.info")
*/
public function infoAction($id)
{
$service = new HelpInfoService();
$help = $service->handle($id);
return $this->jsonSuccess(['help' => $help]);
}
}