1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-21 19:22:45 +08:00
2020-05-20 20:21:17 +08:00

32 lines
648 B
PHP

<?php
namespace App\Http\Web\Controllers;
use App\Services\Frontend\Topic\CourseList as TopicCourseListService;
use App\Services\Frontend\Topic\TopicInfo as TopicInfoService;
/**
* @RoutePrefix("/topic")
*/
class TopicController extends Controller
{
/**
* @Get("/{id:[0-9]+}", name="web.topic.show")
*/
public function showAction($id)
{
$service = new TopicInfoService();
$topic = $service->handle($id);
$service = new TopicCourseListService();
$courses = $service->handle($id);
$this->view->setVar('topic', $topic);
$this->view->setVar('courses', $courses);
}
}