master
cody 4 months ago
parent 7677efd4eb
commit 7d79bfe8c1

@ -71,8 +71,11 @@ class CourseSignController extends BaseController
public function index() public function index()
{ {
$all = request()->all(); $all = request()->all();
$list = $this->model->with('course', 'user', 'thirdAppointmentLogs') $list = $this->model->with(['course', 'thirdAppointmentLogs', 'user' => function ($query) {
->whereHas('user', function ($query) use ($all) { $query->with(['courseSigns' => function ($q) {
$q->where('status', 1)->with('course');
}]);
}])->whereHas('user', function ($query) use ($all) {
if (isset($all['is_vip'])) { if (isset($all['is_vip'])) {
$query->where('is_vip', $all['is_vip']); $query->where('is_vip', $all['is_vip']);
} }

@ -645,6 +645,7 @@ class UserController extends BaseController
$validator = Validator::make($all, [ $validator = Validator::make($all, [
'ids' => 'required', 'ids' => 'required',
], $messages); ], $messages);
if ($validator->fails()) { if ($validator->fails()) {
return $this->fail([StarterResponseCode::START_ERROR_PARAMETER, implode(',', $validator->errors()->all())]); return $this->fail([StarterResponseCode::START_ERROR_PARAMETER, implode(',', $validator->errors()->all())]);
} }

Loading…
Cancel
Save