cfmgrv4 init...10

This commit is contained in:
최준흠 2025-03-24 16:49:51 +09:00
parent a1cf9ec11f
commit 33948d56c1

View File

@ -116,16 +116,20 @@ abstract class CommonController extends BaseController
$this->create_init('create'); $this->create_init('create');
return $this->create_form_procedure(); return $this->create_form_procedure();
} }
protected function create_form_process_result(): string
{
return view(
$this->view_path . "create",
data: ['viewDatas' => $this->getViewDatas()]
);
}
final protected function create_form_procedure(): RedirectResponse|string final protected function create_form_procedure(): RedirectResponse|string
{ {
try { try {
helper(['form']); helper(['form']);
$this->create_form_process(); $this->create_form_process();
$this->forms = ['attributes' => ['method' => "post",], 'hiddens' => []]; $this->forms = ['attributes' => ['method' => "post",], 'hiddens' => []];
return view( return $this->create_form_process_result();
$this->view_path . "create",
data: ['viewDatas' => $this->getViewDatas()]
);
} catch (\Exception $e) { } catch (\Exception $e) {
return redirect()->back()->with('error', $e->getMessage()); return redirect()->back()->with('error', $e->getMessage());
} }
@ -194,16 +198,20 @@ abstract class CommonController extends BaseController
throw new \Exception("해당 정보를 찾을수 없습니다."); throw new \Exception("해당 정보를 찾을수 없습니다.");
} }
} }
protected function modify_form_process_result(): string
{
return view(
$this->view_path . "modify",
data: ['viewDatas' => $this->getViewDatas()]
);
}
final protected function modify_form_procedure(mixed $uid): RedirectResponse|string final protected function modify_form_procedure(mixed $uid): RedirectResponse|string
{ {
try { try {
helper(['form']); helper(['form']);
$this->modify_form_process($uid); $this->modify_form_process($uid);
$this->forms = ['attributes' => ['method' => "post",], 'hiddens' => []]; $this->forms = ['attributes' => ['method' => "post",], 'hiddens' => []];
return view( return $this->modify_form_process_result();
$this->view_path . "modify",
data: ['viewDatas' => $this->getViewDatas()]
);
} catch (\Exception $e) { } catch (\Exception $e) {
return redirect()->back()->with('error', $e->getMessage()); return redirect()->back()->with('error', $e->getMessage());
} }