6
0
Fork 0
jiqu-library-server/app/Admin/Renderable/ProductAttrTable.php

23 lines
532 B
PHP

<?php
namespace App\Admin\Renderable;
use App\Models\ProductAttr;
use Dcat\Admin\Grid;
use Dcat\Admin\Grid\LazyRenderable;
class ProductAttrTable extends LazyRenderable
{
public function grid(): Grid
{
$id = $this->id;
return Grid::make(new ProductAttr(), function (Grid $grid) {
$grid->disableRowSelector(false);
$grid->column('name');
$grid->column('attrs')->label();
$grid->quickSearch(['name']);
$grid->disableActions();
});
}
}