phplaravellaravel-filamentfilamentphp

How to rename the summary section?


In Laravel Filament, I am using summaries to display the total amount to pay:

TextColumn::make('price')
    ->summarize(Sum::make())

I can rename the default "Sum" label:

TextColumn::make('price')
    ->summarize(Sum::make()->label('To pay today:'))

I want to rename the heading of the summary section which is "Summary" by default: how to do that?


Solution

  • You can achieve this by

    php artisan vendor:publish --tag=filament-tables-translations
    

    in summary.heading

    return [
        // …
        'summary' => [
            'heading' => 'To pay today:',
        ],
        // …
    ];
    

    Source