public function table(Table $table): Table
{
return $table
->allowDuplicates()
->columns([
Tables\Columns\TextColumn::make('some_pivot_field')
->formatStateUsing(function ($state, $record) {
// Here I would like to access UserRole.
// I want to be able to see every subscription and make the `active` state orange when expires at is within a month.
// This is not my actual use-case.
}),
]);
}
public function table(Table $table): Table
{
return $table
->allowDuplicates()
->columns([
Tables\Columns\TextColumn::make('some_pivot_field')
->formatStateUsing(function ($state, $record) {
// Here I would like to access UserRole.
// I want to be able to see every subscription and make the `active` state orange when expires at is within a month.
// This is not my actual use-case.
}),
]);
}