pushCriteria(app(RequestCriteria::class)); } public function getJobsSub($data) { return $this->model->where($data)->orderBy('id', 'desc')->get(); } public function getJobsSubAdd($data) { return $this->model->create($data); } public function getJobsById($id) { return $this->model->find($id); } public function getJobsSubUpdate($data, $id) { return $this->model->where('id', $id)->update($data); } public function getJobsAddVar($data) { return $this->model->where($data)->count(); } public function getJobsSubDel($id) { return $this->model->where('id', $id)->delete(); } public function rateDate($data) { return $this->model->where($data)->where('updated_at', '>=', date('Y-m-d 00:00:00')) ->where('updated_at', '<=', date('Y-m-d 23:59:59'))->get(); } public function rateDateCount($data) { return $this->model->where($data)->select('*')->count(); } public function getPersonJobsSub($where) { return $this->model->where($where)->first(); } }