model->with(['jobfairs','resumes','putJobs'])->where($where)->orderBy("personal_look", 'asc')->paginate(10); } public function personJobfair($data, $where, $resumeWhere) { return $this->model->with(['resumes', 'putJobs'=>function ($query) use ($where) { $query->whereIn('audit', $where)->where('display', 1); }, 'jobfairs'])->where($data)->whereHas('resumes')->whereHas('putJobs')->whereHas('jobfairs')->orderBy('id', 'desc')->paginate(10); } public function delete($id){ return $this->model->where('id', $id)->delete(); } }