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 = ??
             ...


is this possible?
Was this page helpful?