This commit is contained in:
Anmol-Chauhan 2022-04-05 19:29:45 +05:30
parent ccd1a420b4
commit 7c3702be49
1 changed files with 4 additions and 0 deletions

View File

@ -105,6 +105,7 @@ class ProductDataGrid extends DataGrid
'products.type as product_type',
'product_flat.status',
'product_flat.price',
'product_flat.url_key',
'attribute_families.name as attribute_family',
DB::raw('SUM(' . DB::getTablePrefix() . 'product_inventories.qty) as quantity')
);
@ -166,6 +167,9 @@ class ProductDataGrid extends DataGrid
'searchable' => true,
'sortable' => true,
'filterable' => true,
'closure' => function ($row) {
return "<a href='".asset($row->url_key)."' target='_blank'>" . $row->product_name . "</a>";
},
]);
$this->addColumn([