diff --git a/app/Config/Constants.php b/app/Config/Constants.php
index c063e50..99adc53 100644
--- a/app/Config/Constants.php
+++ b/app/Config/Constants.php
@@ -176,7 +176,6 @@ define('ICONS', [
'FLAG' => '',
'SEARCH' => '',
'EXCEL' => '
',
- 'HOME' => '',
'PLAY' => '',
'CART' => '',
'CARD' => '',
diff --git a/app/Config/Routes.php b/app/Config/Routes.php
index b458a29..98c18da 100644
--- a/app/Config/Routes.php
+++ b/app/Config/Routes.php
@@ -36,6 +36,7 @@ $routes->group('cloudflare', ['namespace' => 'App\Controllers\Cloudflare'], func
$routes->group('account', function ($routes) {
$routes->get('/', 'AccountController::index');
$routes->get('create', 'AccountController::create_form');
+ $routes->post('create', 'AccountController::create');
});
$routes->group('zone', function ($routes) {
$routes->get('/', 'ZoneController::index');
diff --git a/app/Controllers/MVController.php b/app/Controllers/MVController.php
index 2813bb5..6c1002e 100644
--- a/app/Controllers/MVController.php
+++ b/app/Controllers/MVController.php
@@ -26,8 +26,8 @@ abstract class MVController extends CommonController
throw new \Exception(__FUNCTION__ . "에서 {$field}의 데이터가 array가 아닙니다.\n" . var_export($temps, true));
}
$options = [
- ["" => lang($this->class_name . '.label.' . $field) . ' 선택'],
- lang($this->class_name . '.' . strtoupper($field)),
+ "" => lang($this->class_name . '.label.' . $field) . ' 선택',
+ ...lang($this->class_name . '.' . strtoupper($field)),
];
break;
}
@@ -87,10 +87,10 @@ abstract class MVController extends CommonController
protected function validateFormData(): void
{
//변경할 값 확인 : Upload된 파일 검증시 $this->request->getVar()보다 먼처 체크필요
- $validation = \Config\Services::validation();
+ $validation = service('validation');
$validation->setRules($this->getModel()->getFieldRules($this->fields));
if (!$validation->withRequest($this->request)->run()) {
- throw new \Exception("데이터 검증 오류발생\n" . implode("\n", $this->validator->getErrors()));
+ throw new \Exception("데이터 검증 오류발생\n" . implode("\n", $validation->getErrors()));
}
}
//전송된 데이터
diff --git a/app/Libraries/MyCloudflare/Account.php b/app/Libraries/MyCloudflare/Account.php
index 7a44364..ea618de 100644
--- a/app/Libraries/MyCloudflare/Account.php
+++ b/app/Libraries/MyCloudflare/Account.php
@@ -37,16 +37,17 @@ class Account extends MyCloudflare
// ]
protected function getArrayByResult($result): array
{
- $formDatas[$this->getMyStorage()->getPKField()] = $result->id;
+ $formDatas[$this->getMyStorage()->getPKField()] = $result->id;
$formDatas[$this->getMyStorage()->getTitleField()] = $result->name;
- $formDatas['type'] = $result->type;
- $formDatas['status'] = 'use';
- $formDatas['updated_at'] = $result->created_on;
- $formDatas['created_at'] = $result->created_on;
+ $formDatas['type'] = $result->type;
+ $formDatas['status'] = 'use';
+ $formDatas['updated_at'] = $result->created_on;
+ $formDatas['created_at'] = $result->created_on;
return $formDatas;
}
public function create(array $formDatas): AccountEntity
{
+ throw new \Exception(var_dump($formDatas));
//Socket용
$cf = $this->getMySocket()->request($formDatas['apikey'])
->post('accounts', [
@@ -59,7 +60,7 @@ class Account extends MyCloudflare
}
//Storage용
$formDatas = $this->getArrayByResult($cf->result);
- $entity = $this->getMyStorage()->create($formDatas);
+ $entity = $this->getMyStorage()->create($formDatas);
log_message("notice", "Account::" . __FUNCTION__ . "=> 작업을 완료하였습니다.");
return $entity;
}
diff --git a/app/Views/layouts/admin.php b/app/Views/layouts/admin.php
index 3634b16..dad75ba 100644
--- a/app/Views/layouts/admin.php
+++ b/app/Views/layouts/admin.php
@@ -24,25 +24,19 @@