mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-21 19:22:45 +08:00
32 lines
648 B
PHP
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);
|
|
}
|
|
|
|
}
|