Tim
Tim
FFilament
Created by Tim on 1/17/2024 in #❓┊help
Inline Summaries
Hello, I was wondering if there was a way to use the summeriser for tables in the row itself. in my app I have 2 Models Army.php and Unit.php Armies have many Units and Units have 2 columns I want points and cost I can get a summary at the bottom of the table for the total number of points or the total cost, but can I get one in the table row itself? I'd like the Units column to say "Total Points" with a value of 165. My table function
public static function table(Table $table): Table
{
return $table
->columns([
TextColumn::make('name'),
TextColumn::make('units.points')
])
->filters([
//
])
->actions([
Tables\Actions\ViewAction::make(),
Tables\Actions\EditAction::make(),
])
->bulkActions([
Tables\Actions\BulkActionGroup::make([
Tables\Actions\DeleteBulkAction::make(),
]),
]);
}
public static function table(Table $table): Table
{
return $table
->columns([
TextColumn::make('name'),
TextColumn::make('units.points')
])
->filters([
//
])
->actions([
Tables\Actions\ViewAction::make(),
Tables\Actions\EditAction::make(),
])
->bulkActions([
Tables\Actions\BulkActionGroup::make([
Tables\Actions\DeleteBulkAction::make(),
]),
]);
}
5 replies