This commit is contained in:
Sanjay 2022-04-01 17:09:30 +05:30
parent 293e3b6a67
commit 922da048fa
1 changed files with 6 additions and 2 deletions

View File

@ -194,11 +194,15 @@ class ProductDataGrid extends DataGrid
'searchable' => false,
'filterable' => true,
'closure' => function ($value) {
$html = '';
if ($value->status == 1) {
return trans('admin::app.datagrid.active');
$html .= '<span class="badge badge-md badge-success">' . trans('admin::app.datagrid.active') . '</span>';
} else {
return trans('admin::app.datagrid.inactive');
$html .= '<span class="badge badge-md badge-danger">' . trans('admin::app.datagrid.inactive') . '</span>';
}
return $html;
},
]);