© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
2 replies
Dennyvik

summarize Count icons take all icons as false

Hi All, i am making a list of data with a column that display icon which shown file exists or not.
    Tables\Columns\IconColumn::make('pdf_filename')
    ->label('PDF File')
    ->true('heroicon-o-document-check','indigo')
    ->false('heroicon-o-x-circle','danger')
    ->boolean()->getStateUsing(function (TempInvoiceList $record)  : bool {
        return 
            $record->pdf_filename
            && 
            File::exists(storage_path('app/public/pdf/' . $this->getPeriod($record) . '/' . $record->pdf_filename))
                ? true : false;
    })
    ->summarize(Count::make()->icons())
    ->url(fn (TempInvoiceList $record): ?string =>
        $record->pdf_filename && $record->status_file === 'GENERATED'
            ?  route('invoice', ['period' => $this->getPeriod($record) ,'name' => $record->pdf_filename]) 
            : null,
            shouldOpenInNewTab: true)
    ->alignCenter(),
    Tables\Columns\IconColumn::make('pdf_filename')
    ->label('PDF File')
    ->true('heroicon-o-document-check','indigo')
    ->false('heroicon-o-x-circle','danger')
    ->boolean()->getStateUsing(function (TempInvoiceList $record)  : bool {
        return 
            $record->pdf_filename
            && 
            File::exists(storage_path('app/public/pdf/' . $this->getPeriod($record) . '/' . $record->pdf_filename))
                ? true : false;
    })
    ->summarize(Count::make()->icons())
    ->url(fn (TempInvoiceList $record): ?string =>
        $record->pdf_filename && $record->status_file === 'GENERATED'
            ?  route('invoice', ['period' => $this->getPeriod($record) ,'name' => $record->pdf_filename]) 
            : null,
            shouldOpenInNewTab: true)
    ->alignCenter(),


The icon displayed correctly as intended.
But, the summarize won't work. It counted all rows with the icon for false condition.
Can someone help me? Thanks before.
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Doubts with summarize(Count)
FilamentFFilament / ❓┊help
2y ago
Need Help, How to use Count Summarize
FilamentFFilament / ❓┊help
17mo ago
Calculate summarize from others summarize
FilamentFFilament / ❓┊help
2y ago
icon for false table icons not showing
FilamentFFilament / ❓┊help
3y ago