|
|
|
|
@ -66,9 +66,10 @@ class OtherController extends CommonController
|
|
|
|
|
'total' => User::count() - collect($industryTotal)->sum('total')
|
|
|
|
|
];
|
|
|
|
|
// 课程统计
|
|
|
|
|
$courseTypes = CourseType::where('is_chart',1)->get();
|
|
|
|
|
$courseTypes = CourseType::where('is_chart', 1)->get();
|
|
|
|
|
foreach ($courseTypes as $courseType) {
|
|
|
|
|
$courseType->course_signs_total = CourseSign::whereIn('course_id', $courseType->courses->pluck('id'))
|
|
|
|
|
$courseIds = Course::where('type', $courseType->id)->pluck('id');
|
|
|
|
|
$courseType->course_signs_total = CourseSign::whereIn('course_id', $courseIds)
|
|
|
|
|
->where('status', 1)
|
|
|
|
|
->count();
|
|
|
|
|
}
|
|
|
|
|
|