diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..20d9033 Binary files /dev/null and b/.DS_Store differ diff --git a/app/.DS_Store b/app/.DS_Store new file mode 100644 index 0000000..3967ca7 Binary files /dev/null and b/app/.DS_Store differ diff --git a/app/Forms/WechatpayAccountForm.php b/app/Forms/WechatpayAccountForm.php new file mode 100755 index 0000000..6c42824 --- /dev/null +++ b/app/Forms/WechatpayAccountForm.php @@ -0,0 +1,21 @@ +add("id", Field::HIDDEN); + $this->add("name", Field::TEXT, ["label" => "名称", "rules" => "required"]); + $this->add("mchid", Field::TEXT, ["label" => "商户ID", "rules" => "required"]); + $this->add("key", Field::TEXT, ["label" => "商户密钥", "rules" => "required"]); + $this->add('buttons', 'buttongroup', ["splitted" => true, "buttons" => [ + ["label" => "保存", "attr" => ["class" => "btn btn-primary mr-1", "type" => "submit"]], + ["label" => "返回", "attr" => ["class" => "btn btn-light btn-back", "type" => "button"]] + ]]); + } +} diff --git a/app/Http/Controllers/Admin/WechatpayAccountController.php b/app/Http/Controllers/Admin/WechatpayAccountController.php new file mode 100755 index 0000000..28f29ca --- /dev/null +++ b/app/Http/Controllers/Admin/WechatpayAccountController.php @@ -0,0 +1,28 @@ +model->paginate(10); + return view($this->bladePath . ".index", compact("data")); + } +} diff --git a/app/Models/WechatpayAccount.php b/app/Models/WechatpayAccount.php new file mode 100755 index 0000000..f94aa33 --- /dev/null +++ b/app/Models/WechatpayAccount.php @@ -0,0 +1,8 @@ +id(); + $table->string('name')->nullable(); + $table->string('mchid')->nullable()->unique(); + $table->string('key')->nullable(); + $table->timestamps(); + $table->softDeletes(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('wechatpay_account'); + } +} diff --git a/public/.DS_Store b/public/.DS_Store new file mode 100644 index 0000000..1ac45b8 Binary files /dev/null and b/public/.DS_Store differ diff --git a/resources/.DS_Store b/resources/.DS_Store new file mode 100644 index 0000000..e089db6 Binary files /dev/null and b/resources/.DS_Store differ diff --git a/resources/views/admin/wechatpay-account/create.blade.php b/resources/views/admin/wechatpay-account/create.blade.php new file mode 100755 index 0000000..621e566 --- /dev/null +++ b/resources/views/admin/wechatpay-account/create.blade.php @@ -0,0 +1,43 @@ +@extends("admin.layouts.layout") + +@php + $pageTitle = __("actions.".last(explode("/",request()->url()))).$modelName; +@endphp + +@section("content") +
| + {{$modelName}} + | +商户ID | +商户密钥 | +操作 | +
|---|---|---|---|
| + {{ $row->name }} + | +{{ $row->mchid }} | ++ @lang("icons.action_edit") @lang("actions.edit") + @lang("icons.action_delete") @lang("actions.delete") + | +