model = new RatesModel(); $this->codeModel = new CodeModel(); } public function lists(): string { $codes = $this->codeModel->getCodeLists(['BANK', 'INSURANCE', 'LOAN_PLACE']); // ์ฝ”๋“œ์กฐํšŒ $placeArr = []; foreach ($codes as $c) { if ($c['category'] == "LOAN_PLACE") { array_push($placeArr, $c); } } $data = $this->model->getLists(); $this->data['place'] = $placeArr; $this->data['data'] = $data; return view("pages/interest/list", $this->data); } }