mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-22 03:32:47 +08:00
39 lines
715 B
PHP
39 lines
715 B
PHP
<?php
|
|
|
|
namespace App\Http\Web\Controllers;
|
|
|
|
use App\Services\Frontend\Help\HelpInfo as HelpInfoService;
|
|
use App\Services\Frontend\Help\HelpList as HelpListService;
|
|
|
|
/**
|
|
* @RoutePrefix("/help")
|
|
*/
|
|
class HelpController extends Controller
|
|
{
|
|
|
|
/**
|
|
* @Get("/", name="web.help.index")
|
|
*/
|
|
public function indexAction()
|
|
{
|
|
$service = new HelpListService();
|
|
|
|
$helps = $service->handle();
|
|
|
|
$this->view->setVar('helps', $helps);
|
|
}
|
|
|
|
/**
|
|
* @Get("/{id:[0-9]+}", name="web.help.show")
|
|
*/
|
|
public function showAction($id)
|
|
{
|
|
$service = new HelpInfoService();
|
|
|
|
$help = $service->handle($id);
|
|
|
|
$this->view->setVar('help', $help);
|
|
}
|
|
|
|
}
|