6
0
Fork 0

添加商品分类管理

release
vine_liutk 2021-11-25 10:16:08 +08:00
parent 3ab19005f0
commit 896cd48344
9 changed files with 413 additions and 90 deletions

View File

@ -0,0 +1,120 @@
<?php
namespace App\Admin\Controllers;
use App\Admin\Repositories\ProductCategory;
use App\Models\ProductCategory as ProductCategoryModel;
use Carbon\Carbon;
use Dcat\Admin\Admin;
use Dcat\Admin\Form;
use Dcat\Admin\Grid;
use Dcat\Admin\Grid\Column;
use Dcat\Admin\Http\Controllers\AdminController;
use Dcat\Admin\Show;
class ProductCategoryController extends AdminController
{
/**
* Make a grid builder.
*
* @return Grid
*/
protected function grid()
{
return Grid::make(new ProductCategory(), function (Grid $grid) {
$grid->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');
});
}
}

View File

@ -0,0 +1,16 @@
<?php
namespace App\Admin\Repositories;
use App\Models\ProductCategory as Model;
use Dcat\Admin\Repositories\EloquentRepository;
class ProductCategory extends EloquentRepository
{
/**
* Model.
*
* @var string
*/
protected $eloquentClass = Model::class;
}

View File

@ -30,4 +30,8 @@ Route::group([
])->names('article_categories');
$router->resource('articles', 'ArticleController');
$router->resource('product-categories', 'ProductCategoryController')->only([
'index', 'create', 'store', 'edit', 'update', 'destroy',
])->names('product_categories');
});

View File

@ -0,0 +1,28 @@
<?php
namespace App\Models;
use Dcat\Admin\Traits\HasDateTimeFormatter;
use Dcat\Admin\Traits\ModelTree;
use Illuminate\Database\Eloquent\Model;
use Kalnoy\Nestedset\NodeTrait;
class ProductCategory extends Model
{
use NodeTrait;
use ModelTree;
use HasDateTimeFormatter;
protected $table = 'product_categories';
// 排序字段名称,默认值为 order
protected $orderColumn = 'sort';
// 标题字段名称,默认值为 title
protected $titleColumn = 'name';
public function getDefaultParentId()
{
return $this->parent_id;
}
}

View File

@ -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();

View File

@ -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('属性文本');

View File

@ -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('属性文本');

View File

@ -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 {}

View File

@ -0,0 +1,18 @@
<?php
return [
'labels' => [
'ProductCategory' => '商品分类',
'product-category' => '商品分类',
],
'fields' => [
'name' => '名称',
'icon' => 'ICON',
'is_show' => '显示',
'is_recommend' => '推荐',
'sort' => '排序',
'parent_id' => '父级',
],
'options' => [
],
];