海南旅游SAAS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

52 lines
1.3 KiB

<?php
namespace App\Admin\Forms;
use Dcat\Admin\Widgets\Form;
class Setting extends Form
{
/**
* Handle the form request.
*
* @param array $input
*
* @return mixed
*/
public function handle(array $input)
{
// dump($input);
// return $this->response()->error('Your error message.');
admin_setting($input);
return $this->response()->success('保存成功')->refresh();
}
/**
* Build a form here.
*/
public function form()
{
$this->tab('支付小程序配置', function () {
$this->text('payee_appid', '收款小程序APPID')->required();
$this->text('payee_appsecret', '收款小程序APP_SECRET')->required();
$this->text('payee_mchid', '收款小程序MCH_ID')->required();
$this->text('payee_mchkey', '收款小程序MCH_KEY')->required();
})->tab('小程序服务商配置', function () {
$this->text('service_appid', '小程序第三方平台APPID');
$this->text('service_appsecret', '小程序第三方平台APP_SECRET');
$this->text('service_binding_appid', '绑定小程序APPID');
});
}
/**
* The data of the form.
*
* @return array
*/
public function default()
{
return admin_setting()->toArray();
}
}