How to get record in `columns` fn

i need to generate the columns dinamically.
public static function table(Table $table): Table
{
return $table
->query(Response::latest())
->columns((function (): array {
// here i need to retrieve the record to be able to costumize the columns
$record = ??
...
public static function table(Table $table): Table
{
return $table
->query(Response::latest())
->columns((function (): array {
// here i need to retrieve the record to be able to costumize the columns
$record = ??
...
is this possible?
2 Replies
toeknee
toeknee12mo ago
Depends where the dynamic bit is coming from..... But usually no, you would tend to include all, have have the column visibility set on a colusre condition depending on your selection.
ericmp #2
ericmp #2OP12mo ago
hmm okay thanks for ur time
Want results from more Discord servers?
Add your server