diff --git a/app/AdminAgent/Controllers/SettingController.php b/app/AdminAgent/Controllers/SettingController.php new file mode 100644 index 0000000..9696df8 --- /dev/null +++ b/app/AdminAgent/Controllers/SettingController.php @@ -0,0 +1,18 @@ +title('系统设置') + ->body(new Card(' ', new Setting())); + } +} diff --git a/app/AdminAgent/Forms/Setting.php b/app/AdminAgent/Forms/Setting.php new file mode 100644 index 0000000..ffc60cb --- /dev/null +++ b/app/AdminAgent/Forms/Setting.php @@ -0,0 +1,43 @@ +response()->success('保存成功')->refresh(); + } + + /** + * Build a form here. + */ + public function form() + { + $this->text('earnest')->required()->help('用户支付订金、定金、首付款的金额'); + $this->text('earnest_timeout')->required()->help('单位:分钟。当通过订金、定金、首付款支付时,用户超过该时间未支付将关闭订单,且定金不退'); + } + + /** + * The data of the form. + * + * @return array + */ + public function default() + { + return admin_setting()->toArray(); + } +} diff --git a/resources/lang/zh_CN/setting.php b/resources/lang/zh_CN/setting.php new file mode 100644 index 0000000..19a7f60 --- /dev/null +++ b/resources/lang/zh_CN/setting.php @@ -0,0 +1,13 @@ + [ + 'Setting' => '系统设置', + 'setting' => '系统设置', + ], + 'fields' => [ + 'earnest' => '定金金额', + 'earnest_timeout' => '定金支付超时时间', + ], + 'options' => [ + ], +];