diff --git a/app/Admin/Controllers/ProductCategoryController.php b/app/Admin/Controllers/ProductCategoryController.php new file mode 100644 index 00000000..c9a01ec6 --- /dev/null +++ b/app/Admin/Controllers/ProductCategoryController.php @@ -0,0 +1,120 @@ +column('id')->sortable(); + $grid->column('name')->tree(); + $grid->column('icon')->image(50, 50); + $grid->column('is_show') + ->if(function () { + return Admin::user()->can('dcat.admin.product_categories.edit'); + }) + ->then(function (Column $column) { + $column->switch(); + }) + ->else(function (Column $column) { + $column->bool(); + }); + $grid->column('is_recommend') + ->if(function () { + return Admin::user()->can('dcat.admin.product_categories.edit'); + }) + ->then(function (Column $column) { + $column->switch(); + }) + ->else(function (Column $column) { + $column->bool(); + }); + $grid->column('sort'); + $grid->column('created_at')->sortable(); + + //排序 + $grid->model()->orderBy('created_at', 'desc'); + + /** 操作 **/ + //新增 + if (Admin::user()->can('dcat.admin.product_categories.create')) { + $grid->disableCreateButton(false); + $grid->enableDialogCreate(); + } + //修改 + $grid->showQuickEditButton(Admin::user()->can('dcat.admin.product_categories.edit')); + //删除以及自定义操作 + $grid->actions(function (Grid\Displayers\Actions $actions) { + $actions->disableDelete(Admin::user()->cannot('dcat.admin.product_categories.destroy')); + }); + + /** 查询 **/ + $grid->filter(function (Grid\Filter $filter) { + $filter->panel(); + $filter->equal('name')->width(3); + }); + }); + } + + /** + * Make a show builder. + * + * @param mixed $id + * + * @return Show + */ + protected function detail($id) + { + return Show::make($id, new ProductCategory(), function (Show $show) { + $show->field('id'); + $show->field('name'); + $show->field('icon'); + $show->field('is_show'); + $show->field('sort'); + $show->field('parent_id'); + $show->field('created_at'); + $show->field('updated_at'); + }); + } + + /** + * Make a form builder. + * + * @return Form + */ + protected function form() + { + return Form::make(new ProductCategory(), function (Form $form) { + $form->display('id'); + $form->select('parent_id')->options(ProductCategoryModel::selectOptions()); + $form->text('name')->required(); + $form->image('icon') + ->move('product/'.Carbon::now()->toDateString()) + ->saveFullUrl() + ->removable(false) + ->autoUpload(); + $form->switch('is_show'); + $form->switch('is_recommend'); + $form->number('sort')->default(0); + + $form->display('created_at'); + $form->display('updated_at'); + }); + } +} diff --git a/app/Admin/Repositories/ProductCategory.php b/app/Admin/Repositories/ProductCategory.php new file mode 100644 index 00000000..83df266e --- /dev/null +++ b/app/Admin/Repositories/ProductCategory.php @@ -0,0 +1,16 @@ +names('article_categories'); $router->resource('articles', 'ArticleController'); + + $router->resource('product-categories', 'ProductCategoryController')->only([ + 'index', 'create', 'store', 'edit', 'update', 'destroy', + ])->names('product_categories'); }); diff --git a/app/Models/ProductCategory.php b/app/Models/ProductCategory.php new file mode 100644 index 00000000..b6cce773 --- /dev/null +++ b/app/Models/ProductCategory.php @@ -0,0 +1,28 @@ +parent_id; + } +} diff --git a/database/migrations/2021_11_22_105141_create_product_categories_table.php b/database/migrations/2021_11_22_105141_create_product_categories_table.php index d694047d..c47ae453 100644 --- a/database/migrations/2021_11_22_105141_create_product_categories_table.php +++ b/database/migrations/2021_11_22_105141_create_product_categories_table.php @@ -18,6 +18,7 @@ class CreateProductCategoriesTable extends Migration $table->string('name')->comment('分类名称'); $table->string('icon')->nullable()->comment('分类ICON'); $table->tinyInteger('is_show')->default(0)->comment('是否显示:0不显示,1显示'); + $table->tinyInteger('is_recommend')->default(0)->comment('是否推荐:0不推荐,1推荐'); $table->integer('sort')->default(0)->comment('排序'); $table->nestedSet(); $table->timestamps(); diff --git a/database/migrations/2021_11_22_110044_create_product_spus_table.php b/database/migrations/2021_11_22_110044_create_product_spus_table.php index f9fad1e4..2d919ccd 100644 --- a/database/migrations/2021_11_22_110044_create_product_spus_table.php +++ b/database/migrations/2021_11_22_110044_create_product_spus_table.php @@ -23,7 +23,7 @@ class CreateProductSpusTable extends Migration $table->bigInteger('sell_price')->unsigned()->default(0)->comment('销售价格:分'); $table->bigInteger('market_price')->unsigned()->default(0)->comment('市场价格:分'); $table->bigInteger('cost_price')->unsigned()->default(0)->comment('成本价格:分'); - $table->bigInteger('user_price')->unsigned()->default(0)->comment('会员价格:分'); + $table->bigInteger('user_price')->unsigned()->nullable()->comment('会员价格:分'); $table->string('media')->nullable()->comment('媒体地址'); $table->integer('weight')->unsigned()->nullable()->comment('重量:g'); $table->json('attrs')->nullable()->comment('属性文本'); diff --git a/database/migrations/2021_11_24_120232_create_product_skus_table.php b/database/migrations/2021_11_24_120232_create_product_skus_table.php index f4b995fe..0e49c828 100644 --- a/database/migrations/2021_11_24_120232_create_product_skus_table.php +++ b/database/migrations/2021_11_24_120232_create_product_skus_table.php @@ -24,7 +24,7 @@ class CreateProductSkusTable extends Migration $table->bigInteger('sell_price')->unsigned()->default(0)->comment('销售价格:分'); $table->bigInteger('market_price')->unsigned()->default(0)->comment('市场价格:分'); $table->bigInteger('cost_price')->unsigned()->default(0)->comment('成本价格:分'); - $table->bigInteger('user_price')->unsigned()->default(0)->comment('会员价格:分'); + $table->bigInteger('user_price')->unsigned()->nullable()->comment('会员价格:分'); $table->string('media')->nullable()->comment('媒体地址'); $table->integer('weight')->unsigned()->nullable()->comment('重量:g'); $table->json('attrs')->nullable()->comment('属性文本'); diff --git a/dcat_admin_ide_helper.php b/dcat_admin_ide_helper.php index 430a2627..1d76ce25 100644 --- a/dcat_admin_ide_helper.php +++ b/dcat_admin_ide_helper.php @@ -11,202 +11,338 @@ namespace Dcat\Admin { use Illuminate\Support\Collection; /** - * @property Grid\Column|Collection created_at - * @property Grid\Column|Collection dimensions * @property Grid\Column|Collection id - * @property Grid\Column|Collection is_show * @property Grid\Column|Collection key * @property Grid\Column|Collection name + * @property Grid\Column|Collection dimensions + * @property Grid\Column|Collection is_show + * @property Grid\Column|Collection created_at * @property Grid\Column|Collection updated_at - * @property Grid\Column|Collection detail * @property Grid\Column|Collection type * @property Grid\Column|Collection version + * @property Grid\Column|Collection detail * @property Grid\Column|Collection is_enabled - * @property Grid\Column|Collection extension - * @property Grid\Column|Collection icon - * @property Grid\Column|Collection order * @property Grid\Column|Collection parent_id + * @property Grid\Column|Collection order + * @property Grid\Column|Collection icon * @property Grid\Column|Collection uri - * @property Grid\Column|Collection menu_id + * @property Grid\Column|Collection extension * @property Grid\Column|Collection permission_id + * @property Grid\Column|Collection menu_id + * @property Grid\Column|Collection slug * @property Grid\Column|Collection http_method * @property Grid\Column|Collection http_path - * @property Grid\Column|Collection slug * @property Grid\Column|Collection role_id * @property Grid\Column|Collection user_id * @property Grid\Column|Collection value - * @property Grid\Column|Collection avatar - * @property Grid\Column|Collection password - * @property Grid\Column|Collection remember_token * @property Grid\Column|Collection username + * @property Grid\Column|Collection password + * @property Grid\Column|Collection avatar + * @property Grid\Column|Collection remember_token * @property Grid\Column|Collection address_id - * @property Grid\Column|Collection jump_link - * @property Grid\Column|Collection jump_type + * @property Grid\Column|Collection image * @property Grid\Column|Collection sort - * @property Grid\Column|Collection src_path + * @property Grid\Column|Collection jump_type + * @property Grid\Column|Collection jump_link + * @property Grid\Column|Collection is_recommend * @property Grid\Column|Collection _lft * @property Grid\Column|Collection _rgt - * @property Grid\Column|Collection is_recommend - * @property Grid\Column|Collection author_name * @property Grid\Column|Collection category_id - * @property Grid\Column|Collection content - * @property Grid\Column|Collection cover_src_path + * @property Grid\Column|Collection author_name * @property Grid\Column|Collection subtitle + * @property Grid\Column|Collection cover + * @property Grid\Column|Collection content + * @property Grid\Column|Collection uuid * @property Grid\Column|Collection connection + * @property Grid\Column|Collection queue + * @property Grid\Column|Collection payload * @property Grid\Column|Collection exception * @property Grid\Column|Collection failed_at - * @property Grid\Column|Collection payload - * @property Grid\Column|Collection queue - * @property Grid\Column|Collection uuid + * @property Grid\Column|Collection tokenable_type + * @property Grid\Column|Collection tokenable_id + * @property Grid\Column|Collection token + * @property Grid\Column|Collection abilities + * @property Grid\Column|Collection last_used_at + * @property Grid\Column|Collection spu_id + * @property Grid\Column|Collection images + * @property Grid\Column|Collection sell_price + * @property Grid\Column|Collection market_price + * @property Grid\Column|Collection cost_price + * @property Grid\Column|Collection user_price + * @property Grid\Column|Collection media + * @property Grid\Column|Collection weight + * @property Grid\Column|Collection attrs + * @property Grid\Column|Collection is_sell + * @property Grid\Column|Collection spec_items + * @property Grid\Column|Collection items + * @property Grid\Column|Collection product_spu_id + * @property Grid\Column|Collection phone + * @property Grid\Column|Collection code + * @property Grid\Column|Collection is_use + * @property Grid\Column|Collection expires_at + * @property Grid\Column|Collection inviter_id + * @property Grid\Column|Collection nickname + * @property Grid\Column|Collection gender + * @property Grid\Column|Collection birthday + * @property Grid\Column|Collection phone_verified_at + * @property Grid\Column|Collection email + * @property Grid\Column|Collection email_verified_at + * @property Grid\Column|Collection last_login_ip + * @property Grid\Column|Collection last_login_at + * @property Grid\Column|Collection register_ip + * @property Grid\Column|Collection status + * @property Grid\Column|Collection status_remark * - * @method Grid\Column|Collection created_at(string $label = null) - * @method Grid\Column|Collection dimensions(string $label = null) * @method Grid\Column|Collection id(string $label = null) - * @method Grid\Column|Collection is_show(string $label = null) * @method Grid\Column|Collection key(string $label = null) * @method Grid\Column|Collection name(string $label = null) + * @method Grid\Column|Collection dimensions(string $label = null) + * @method Grid\Column|Collection is_show(string $label = null) + * @method Grid\Column|Collection created_at(string $label = null) * @method Grid\Column|Collection updated_at(string $label = null) - * @method Grid\Column|Collection detail(string $label = null) * @method Grid\Column|Collection type(string $label = null) * @method Grid\Column|Collection version(string $label = null) + * @method Grid\Column|Collection detail(string $label = null) * @method Grid\Column|Collection is_enabled(string $label = null) - * @method Grid\Column|Collection extension(string $label = null) - * @method Grid\Column|Collection icon(string $label = null) - * @method Grid\Column|Collection order(string $label = null) * @method Grid\Column|Collection parent_id(string $label = null) + * @method Grid\Column|Collection order(string $label = null) + * @method Grid\Column|Collection icon(string $label = null) * @method Grid\Column|Collection uri(string $label = null) - * @method Grid\Column|Collection menu_id(string $label = null) + * @method Grid\Column|Collection extension(string $label = null) * @method Grid\Column|Collection permission_id(string $label = null) + * @method Grid\Column|Collection menu_id(string $label = null) + * @method Grid\Column|Collection slug(string $label = null) * @method Grid\Column|Collection http_method(string $label = null) * @method Grid\Column|Collection http_path(string $label = null) - * @method Grid\Column|Collection slug(string $label = null) * @method Grid\Column|Collection role_id(string $label = null) * @method Grid\Column|Collection user_id(string $label = null) * @method Grid\Column|Collection value(string $label = null) - * @method Grid\Column|Collection avatar(string $label = null) - * @method Grid\Column|Collection password(string $label = null) - * @method Grid\Column|Collection remember_token(string $label = null) * @method Grid\Column|Collection username(string $label = null) + * @method Grid\Column|Collection password(string $label = null) + * @method Grid\Column|Collection avatar(string $label = null) + * @method Grid\Column|Collection remember_token(string $label = null) * @method Grid\Column|Collection address_id(string $label = null) - * @method Grid\Column|Collection jump_link(string $label = null) - * @method Grid\Column|Collection jump_type(string $label = null) + * @method Grid\Column|Collection image(string $label = null) * @method Grid\Column|Collection sort(string $label = null) - * @method Grid\Column|Collection src_path(string $label = null) + * @method Grid\Column|Collection jump_type(string $label = null) + * @method Grid\Column|Collection jump_link(string $label = null) + * @method Grid\Column|Collection is_recommend(string $label = null) * @method Grid\Column|Collection _lft(string $label = null) * @method Grid\Column|Collection _rgt(string $label = null) - * @method Grid\Column|Collection is_recommend(string $label = null) - * @method Grid\Column|Collection author_name(string $label = null) * @method Grid\Column|Collection category_id(string $label = null) - * @method Grid\Column|Collection content(string $label = null) - * @method Grid\Column|Collection cover_src_path(string $label = null) + * @method Grid\Column|Collection author_name(string $label = null) * @method Grid\Column|Collection subtitle(string $label = null) + * @method Grid\Column|Collection cover(string $label = null) + * @method Grid\Column|Collection content(string $label = null) + * @method Grid\Column|Collection uuid(string $label = null) * @method Grid\Column|Collection connection(string $label = null) + * @method Grid\Column|Collection queue(string $label = null) + * @method Grid\Column|Collection payload(string $label = null) * @method Grid\Column|Collection exception(string $label = null) * @method Grid\Column|Collection failed_at(string $label = null) - * @method Grid\Column|Collection payload(string $label = null) - * @method Grid\Column|Collection queue(string $label = null) - * @method Grid\Column|Collection uuid(string $label = null) + * @method Grid\Column|Collection tokenable_type(string $label = null) + * @method Grid\Column|Collection tokenable_id(string $label = null) + * @method Grid\Column|Collection token(string $label = null) + * @method Grid\Column|Collection abilities(string $label = null) + * @method Grid\Column|Collection last_used_at(string $label = null) + * @method Grid\Column|Collection spu_id(string $label = null) + * @method Grid\Column|Collection images(string $label = null) + * @method Grid\Column|Collection sell_price(string $label = null) + * @method Grid\Column|Collection market_price(string $label = null) + * @method Grid\Column|Collection cost_price(string $label = null) + * @method Grid\Column|Collection user_price(string $label = null) + * @method Grid\Column|Collection media(string $label = null) + * @method Grid\Column|Collection weight(string $label = null) + * @method Grid\Column|Collection attrs(string $label = null) + * @method Grid\Column|Collection is_sell(string $label = null) + * @method Grid\Column|Collection spec_items(string $label = null) + * @method Grid\Column|Collection items(string $label = null) + * @method Grid\Column|Collection product_spu_id(string $label = null) + * @method Grid\Column|Collection phone(string $label = null) + * @method Grid\Column|Collection code(string $label = null) + * @method Grid\Column|Collection is_use(string $label = null) + * @method Grid\Column|Collection expires_at(string $label = null) + * @method Grid\Column|Collection inviter_id(string $label = null) + * @method Grid\Column|Collection nickname(string $label = null) + * @method Grid\Column|Collection gender(string $label = null) + * @method Grid\Column|Collection birthday(string $label = null) + * @method Grid\Column|Collection phone_verified_at(string $label = null) + * @method Grid\Column|Collection email(string $label = null) + * @method Grid\Column|Collection email_verified_at(string $label = null) + * @method Grid\Column|Collection last_login_ip(string $label = null) + * @method Grid\Column|Collection last_login_at(string $label = null) + * @method Grid\Column|Collection register_ip(string $label = null) + * @method Grid\Column|Collection status(string $label = null) + * @method Grid\Column|Collection status_remark(string $label = null) */ class Grid {} class MiniGrid extends Grid {} /** - * @property Show\Field|Collection created_at - * @property Show\Field|Collection dimensions * @property Show\Field|Collection id - * @property Show\Field|Collection is_show * @property Show\Field|Collection key * @property Show\Field|Collection name + * @property Show\Field|Collection dimensions + * @property Show\Field|Collection is_show + * @property Show\Field|Collection created_at * @property Show\Field|Collection updated_at - * @property Show\Field|Collection detail * @property Show\Field|Collection type * @property Show\Field|Collection version + * @property Show\Field|Collection detail * @property Show\Field|Collection is_enabled - * @property Show\Field|Collection extension - * @property Show\Field|Collection icon - * @property Show\Field|Collection order * @property Show\Field|Collection parent_id + * @property Show\Field|Collection order + * @property Show\Field|Collection icon * @property Show\Field|Collection uri - * @property Show\Field|Collection menu_id + * @property Show\Field|Collection extension * @property Show\Field|Collection permission_id + * @property Show\Field|Collection menu_id + * @property Show\Field|Collection slug * @property Show\Field|Collection http_method * @property Show\Field|Collection http_path - * @property Show\Field|Collection slug * @property Show\Field|Collection role_id * @property Show\Field|Collection user_id * @property Show\Field|Collection value - * @property Show\Field|Collection avatar - * @property Show\Field|Collection password - * @property Show\Field|Collection remember_token * @property Show\Field|Collection username + * @property Show\Field|Collection password + * @property Show\Field|Collection avatar + * @property Show\Field|Collection remember_token * @property Show\Field|Collection address_id - * @property Show\Field|Collection jump_link - * @property Show\Field|Collection jump_type + * @property Show\Field|Collection image * @property Show\Field|Collection sort - * @property Show\Field|Collection src_path + * @property Show\Field|Collection jump_type + * @property Show\Field|Collection jump_link + * @property Show\Field|Collection is_recommend * @property Show\Field|Collection _lft * @property Show\Field|Collection _rgt - * @property Show\Field|Collection is_recommend - * @property Show\Field|Collection author_name * @property Show\Field|Collection category_id - * @property Show\Field|Collection content - * @property Show\Field|Collection cover_src_path + * @property Show\Field|Collection author_name * @property Show\Field|Collection subtitle + * @property Show\Field|Collection cover + * @property Show\Field|Collection content + * @property Show\Field|Collection uuid * @property Show\Field|Collection connection + * @property Show\Field|Collection queue + * @property Show\Field|Collection payload * @property Show\Field|Collection exception * @property Show\Field|Collection failed_at - * @property Show\Field|Collection payload - * @property Show\Field|Collection queue - * @property Show\Field|Collection uuid + * @property Show\Field|Collection tokenable_type + * @property Show\Field|Collection tokenable_id + * @property Show\Field|Collection token + * @property Show\Field|Collection abilities + * @property Show\Field|Collection last_used_at + * @property Show\Field|Collection spu_id + * @property Show\Field|Collection images + * @property Show\Field|Collection sell_price + * @property Show\Field|Collection market_price + * @property Show\Field|Collection cost_price + * @property Show\Field|Collection user_price + * @property Show\Field|Collection media + * @property Show\Field|Collection weight + * @property Show\Field|Collection attrs + * @property Show\Field|Collection is_sell + * @property Show\Field|Collection spec_items + * @property Show\Field|Collection items + * @property Show\Field|Collection product_spu_id + * @property Show\Field|Collection phone + * @property Show\Field|Collection code + * @property Show\Field|Collection is_use + * @property Show\Field|Collection expires_at + * @property Show\Field|Collection inviter_id + * @property Show\Field|Collection nickname + * @property Show\Field|Collection gender + * @property Show\Field|Collection birthday + * @property Show\Field|Collection phone_verified_at + * @property Show\Field|Collection email + * @property Show\Field|Collection email_verified_at + * @property Show\Field|Collection last_login_ip + * @property Show\Field|Collection last_login_at + * @property Show\Field|Collection register_ip + * @property Show\Field|Collection status + * @property Show\Field|Collection status_remark * - * @method Show\Field|Collection created_at(string $label = null) - * @method Show\Field|Collection dimensions(string $label = null) * @method Show\Field|Collection id(string $label = null) - * @method Show\Field|Collection is_show(string $label = null) * @method Show\Field|Collection key(string $label = null) * @method Show\Field|Collection name(string $label = null) + * @method Show\Field|Collection dimensions(string $label = null) + * @method Show\Field|Collection is_show(string $label = null) + * @method Show\Field|Collection created_at(string $label = null) * @method Show\Field|Collection updated_at(string $label = null) - * @method Show\Field|Collection detail(string $label = null) * @method Show\Field|Collection type(string $label = null) * @method Show\Field|Collection version(string $label = null) + * @method Show\Field|Collection detail(string $label = null) * @method Show\Field|Collection is_enabled(string $label = null) - * @method Show\Field|Collection extension(string $label = null) - * @method Show\Field|Collection icon(string $label = null) - * @method Show\Field|Collection order(string $label = null) * @method Show\Field|Collection parent_id(string $label = null) + * @method Show\Field|Collection order(string $label = null) + * @method Show\Field|Collection icon(string $label = null) * @method Show\Field|Collection uri(string $label = null) - * @method Show\Field|Collection menu_id(string $label = null) + * @method Show\Field|Collection extension(string $label = null) * @method Show\Field|Collection permission_id(string $label = null) + * @method Show\Field|Collection menu_id(string $label = null) + * @method Show\Field|Collection slug(string $label = null) * @method Show\Field|Collection http_method(string $label = null) * @method Show\Field|Collection http_path(string $label = null) - * @method Show\Field|Collection slug(string $label = null) * @method Show\Field|Collection role_id(string $label = null) * @method Show\Field|Collection user_id(string $label = null) * @method Show\Field|Collection value(string $label = null) - * @method Show\Field|Collection avatar(string $label = null) - * @method Show\Field|Collection password(string $label = null) - * @method Show\Field|Collection remember_token(string $label = null) * @method Show\Field|Collection username(string $label = null) + * @method Show\Field|Collection password(string $label = null) + * @method Show\Field|Collection avatar(string $label = null) + * @method Show\Field|Collection remember_token(string $label = null) * @method Show\Field|Collection address_id(string $label = null) - * @method Show\Field|Collection jump_link(string $label = null) - * @method Show\Field|Collection jump_type(string $label = null) + * @method Show\Field|Collection image(string $label = null) * @method Show\Field|Collection sort(string $label = null) - * @method Show\Field|Collection src_path(string $label = null) + * @method Show\Field|Collection jump_type(string $label = null) + * @method Show\Field|Collection jump_link(string $label = null) + * @method Show\Field|Collection is_recommend(string $label = null) * @method Show\Field|Collection _lft(string $label = null) * @method Show\Field|Collection _rgt(string $label = null) - * @method Show\Field|Collection is_recommend(string $label = null) - * @method Show\Field|Collection author_name(string $label = null) * @method Show\Field|Collection category_id(string $label = null) - * @method Show\Field|Collection content(string $label = null) - * @method Show\Field|Collection cover_src_path(string $label = null) + * @method Show\Field|Collection author_name(string $label = null) * @method Show\Field|Collection subtitle(string $label = null) + * @method Show\Field|Collection cover(string $label = null) + * @method Show\Field|Collection content(string $label = null) + * @method Show\Field|Collection uuid(string $label = null) * @method Show\Field|Collection connection(string $label = null) + * @method Show\Field|Collection queue(string $label = null) + * @method Show\Field|Collection payload(string $label = null) * @method Show\Field|Collection exception(string $label = null) * @method Show\Field|Collection failed_at(string $label = null) - * @method Show\Field|Collection payload(string $label = null) - * @method Show\Field|Collection queue(string $label = null) - * @method Show\Field|Collection uuid(string $label = null) + * @method Show\Field|Collection tokenable_type(string $label = null) + * @method Show\Field|Collection tokenable_id(string $label = null) + * @method Show\Field|Collection token(string $label = null) + * @method Show\Field|Collection abilities(string $label = null) + * @method Show\Field|Collection last_used_at(string $label = null) + * @method Show\Field|Collection spu_id(string $label = null) + * @method Show\Field|Collection images(string $label = null) + * @method Show\Field|Collection sell_price(string $label = null) + * @method Show\Field|Collection market_price(string $label = null) + * @method Show\Field|Collection cost_price(string $label = null) + * @method Show\Field|Collection user_price(string $label = null) + * @method Show\Field|Collection media(string $label = null) + * @method Show\Field|Collection weight(string $label = null) + * @method Show\Field|Collection attrs(string $label = null) + * @method Show\Field|Collection is_sell(string $label = null) + * @method Show\Field|Collection spec_items(string $label = null) + * @method Show\Field|Collection items(string $label = null) + * @method Show\Field|Collection product_spu_id(string $label = null) + * @method Show\Field|Collection phone(string $label = null) + * @method Show\Field|Collection code(string $label = null) + * @method Show\Field|Collection is_use(string $label = null) + * @method Show\Field|Collection expires_at(string $label = null) + * @method Show\Field|Collection inviter_id(string $label = null) + * @method Show\Field|Collection nickname(string $label = null) + * @method Show\Field|Collection gender(string $label = null) + * @method Show\Field|Collection birthday(string $label = null) + * @method Show\Field|Collection phone_verified_at(string $label = null) + * @method Show\Field|Collection email(string $label = null) + * @method Show\Field|Collection email_verified_at(string $label = null) + * @method Show\Field|Collection last_login_ip(string $label = null) + * @method Show\Field|Collection last_login_at(string $label = null) + * @method Show\Field|Collection register_ip(string $label = null) + * @method Show\Field|Collection status(string $label = null) + * @method Show\Field|Collection status_remark(string $label = null) */ class Show {} diff --git a/resources/lang/zh_CN/product-category.php b/resources/lang/zh_CN/product-category.php new file mode 100644 index 00000000..6a6bfa1c --- /dev/null +++ b/resources/lang/zh_CN/product-category.php @@ -0,0 +1,18 @@ + [ + 'ProductCategory' => '商品分类', + 'product-category' => '商品分类', + ], + 'fields' => [ + 'name' => '名称', + 'icon' => 'ICON', + 'is_show' => '显示', + 'is_recommend' => '推荐', + 'sort' => '排序', + 'parent_id' => '父级', + ], + 'options' => [ + ], +];