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") +
+
+
+
+ @include("public._form") +
+
+
+
+@endsection + +@push("footer") + +@endpush diff --git a/resources/views/admin/wechatpay-account/index.blade.php b/resources/views/admin/wechatpay-account/index.blade.php new file mode 100755 index 0000000..9c6ff81 --- /dev/null +++ b/resources/views/admin/wechatpay-account/index.blade.php @@ -0,0 +1,56 @@ +@extends("admin.layouts.layout") + +@section("content") +
+
+
+
+ + + + + + + + + + + + + @foreach ($data as $row) + + + + + + @endforeach + +
+ {{$modelName}} + 商户ID商户密钥操作
+ {{ $row->name }} + {{ $row->mchid }} + @lang("icons.action_edit") @lang("actions.edit") + @lang("icons.action_delete") @lang("actions.delete") +
+ @include("public._pages") +
+ +
+
+
+ + @include("public._delete") +@endsection + +@push("footer") + +@endpush diff --git a/routes/web.php b/routes/web.php index 88a34f9..b3ff41f 100644 --- a/routes/web.php +++ b/routes/web.php @@ -65,6 +65,7 @@ Route::group(["namespace" => "Admin", "prefix" => "admin"], function () { \App\Models\CommonModel::generateCurdRouter("FactorController", "factor"); \App\Models\CommonModel::generateCurdRouter("TrainingTypeController", "training-type"); \App\Models\CommonModel::generateCurdRouter("TrainingController", "training"); + \App\Models\CommonModel::generateCurdRouter("WechatpayAccountController", "wechatpay-account"); Route::get("product", 'ProductController@index'); Route::get("product/create", 'ProductController@create'); diff --git a/tests/.DS_Store b/tests/.DS_Store new file mode 100644 index 0000000..1dec7cc Binary files /dev/null and b/tests/.DS_Store differ