|
@@ -243,7 +243,7 @@ class ApiController extends Controller
|
|
return response()->json(['status' => 'fail', 'info' => '找不到学员']);
|
|
return response()->json(['status' => 'fail', 'info' => '找不到学员']);
|
|
}
|
|
}
|
|
$student_course = StudentCourse::where('student_id', $student->id)->first();
|
|
$student_course = StudentCourse::where('student_id', $student->id)->first();
|
|
- if(empty($course)) {
|
|
|
|
|
|
+ if(empty($student_course)) {
|
|
return response()->json(['status' => 'fail', 'info' => '暂无课程']);
|
|
return response()->json(['status' => 'fail', 'info' => '暂无课程']);
|
|
}
|
|
}
|
|
$res = Leave::create([
|
|
$res = Leave::create([
|