Custom Table Values

Hey, I have a List table view here, and my entity (model) doesn't actually have the values .. they're in another table.

I need to control the point where it grabs the value.

I saw on the v1.0 docs (accidentally landed there) that we can do Column->getValueUsing(), which I thought might have been right, but i'm on v3 now.

Here is the code I was trying, before I discovered getValueUsing() is deprecated technique

 php
return $table
->columns([
        
    TextColumn::make('name')
        ->searchable(),
    Column::make('benefits')
        ->label('Benefits')
        ->getValueUsing($callback = fn($record) => $this->getBenefitsTextFromIngredient($record)),
Was this page helpful?