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