empty(),
new Column('Empty Hook')->empty()->hookFormatter(fn(IRowData $row) => $this->emptyCol($row)),
);
$this->tableSettings = new GenericTableSettings(Product::class, $columns);
PaginationRack::addFlags($this->paginationRack, PaginationRack::TOP, PaginationRack::BOTTOM);
}
public function emptyCol(IRowData $row)
{
return ''.$row->get('id').'';
}
#[CellFormatter('price')]
public function priceFormatter(ICellData $cell, IRowData $row)
{
return "\$ {$cell->value}";
}
#[CellFormatter('id')]
public function idFormatter(ICellData $cell, IRowData $row)
{
return '# '.$cell->value;
}
}