Why do some table columns allow passing model and others don't?
I have a table:
return $table
->columns([
//
TextColumn::make('name'),
TextColumn::make('product_package_type')->label('Product'),
TextColumn::make('account_status')
->badge()
->color(function(Model $record){
return $record->account_status->getColor();
})
->tooltip(function(Model $record) {
return $record->account_status->description();
}),
TextColumn::make('next_bill_at')->label(function(Model $record){
// Model is null WTF?
}),
])
when I try to modify the next_bill_at label or use formatStateUsing its always null.
However it has a value. And account status works fine passing the model.
WHY does Filiment not always pass the model?
1 Reply
// Model is null WTF?It doesn't make sense to modify the label based on the
$record. There is only one column header.