baseRequest('vacancies/' . $data)->get(); $this->item = $item; } else { $this->item = $data; } } public function getName() { return ($this->item) ? $this->item->name : null; } public static function search($params) { $v = new self(); return $v->baseRequest('vacancies')->addParams($params)->get(); } }