mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-17 07:45:29 +08:00
44 lines
885 B
PHP
44 lines
885 B
PHP
<?php
|
|
|
|
namespace App\Http\Admin\Controllers;
|
|
|
|
use App\Http\Admin\Services\XmCourse as XmCourseService;
|
|
|
|
/**
|
|
* @RoutePrefix("/admin/xm/course")
|
|
*/
|
|
class XmCourseController extends Controller
|
|
{
|
|
|
|
/**
|
|
* @Get("/all", name="admin.xm.course.all")
|
|
*/
|
|
public function allAction()
|
|
{
|
|
$xmCourseService = new XmCourseService();
|
|
|
|
$pager = $xmCourseService->getAllCourses();
|
|
|
|
return $this->ajaxSuccess([
|
|
'count' => $pager->total_items,
|
|
'data' => $pager->items,
|
|
]);
|
|
}
|
|
|
|
/**
|
|
* @Get("/paid", name="admin.xm.course.paid")
|
|
*/
|
|
public function paidAction()
|
|
{
|
|
$xmCourseService = new XmCourseService();
|
|
|
|
$pager = $xmCourseService->getPaidCourses();
|
|
|
|
return $this->ajaxSuccess([
|
|
'count' => $pager->total_items,
|
|
'data' => $pager->items,
|
|
]);
|
|
}
|
|
|
|
}
|