public function getCompanies(CompanyService $company) { try { return $this->json_response->success($company->getAllCompanies()); } catch (Exception $e) { return $this->json_response->error(['error' => $e->getMessage()]); } }