Displaying Two Table Columns same name with Different Labels in Filament Version 3

  public static function table(Table $table): Table
    {
        return $table
            ->columns([
                Tables\Columns\CheckboxColumn::make('tax')
                  ->label('Tax 1')
                  ->searchable(),
                Tables\Columns\TextColumn::make('tax2')
                  ->label('Tax 2')
                  ->getStateUsing(fn ($record) => $record->tax)
                  ->formatStateUsing(fn (string $state): HtmlString => new HtmlString("<i>".$state."</i>"))
                  ->searchable()
                  ]);
    }

Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *