'like', Default Condition "=" ]; /** * Specify Model class name. * * @return string */ public function model() { return Department::class; } /** * Boot up the repository, pushing criteria. * * @throws \Prettus\Repository\Exceptions\RepositoryException */ public function boot() { $this->pushCriteria(app(RequestCriteria::class)); } /** * @return mixed */ public function searchDepartmentsByPage() { return $this->paginate(request('per_page', 15)); } public function searchDepartments() { return $this->all(); } /** * @param $id * * @return mixed */ public function searchDepartmentBy($id) { return $this->find($id); } public function tree($where) { return toTree($this->all()); } }