|
@@ -132,7 +132,7 @@ class Education
|
|
|
*/
|
|
*/
|
|
|
public function getCourseInfo($gr_id) {
|
|
public function getCourseInfo($gr_id) {
|
|
|
$courses = EducationCourse::where('course_status', 1)
|
|
$courses = EducationCourse::where('course_status', 1)
|
|
|
- ->where('gr_id', $gr_id)
|
|
|
|
|
|
|
+ ->whereIn('gr_id', (array) $gr_id)
|
|
|
->where('course_audit', 1)
|
|
->where('course_audit', 1)
|
|
|
->select();
|
|
->select();
|
|
|
$course_list = [];
|
|
$course_list = [];
|
|
@@ -145,12 +145,7 @@ class Education
|
|
|
];
|
|
];
|
|
|
$course_list[] = $course_info;
|
|
$course_list[] = $course_info;
|
|
|
}
|
|
}
|
|
|
- $count_and_all = [];
|
|
|
|
|
- if (is_array($gr_id)) {
|
|
|
|
|
- $count_and_all = $this->getCountAndAlll($gr_id);
|
|
|
|
|
- } else {
|
|
|
|
|
- $count_and_all = $this->getCountAndAlll([$gr_id]);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ $count_and_all = $this->getCountAndAlll((array) $gr_id);
|
|
|
$result = [
|
|
$result = [
|
|
|
'course_list' => $course_list,
|
|
'course_list' => $course_list,
|
|
|
'count' => $count_and_all[0]['count'],
|
|
'count' => $count_and_all[0]['count'],
|