| xqd
@@ -22,12 +22,13 @@ class ProductController extends AdminController
|
|
|
return Grid::make(new Product(), function (Grid $grid) {
|
|
|
$grid->model()->orderByDesc('id');
|
|
|
$grid->column('id')->sortable();
|
|
|
+
|
|
|
$grid->column('image')->image('',40);
|
|
|
- $grid->column('type')->display(function (){
|
|
|
+ $grid->column('url')->link();
|
|
|
+ $grid->column('type',admin_trans_field('type'))->display(function (){
|
|
|
$arr = \App\Models\ProductType::query()->whereIn('id',$this->type)->pluck('zh_name');
|
|
|
return $arr;
|
|
|
})->label();
|
|
|
- $grid->column('type.zh_name',admin_trans_field('type'));
|
|
|
$grid->column('user.name',admin_trans_field('user_id'));
|
|
|
$grid->column('name');
|
|
|
$grid->column('content');
|