Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Filament Toggle Icon Column Laravel Package

archilex/filament-toggle-icon-column

Filament Toggle Icon Column adds a clickable icon column to Filament tables for toggling boolean values inline. Customize on/off icons, colors, tooltips, and confirmation prompts for fast, intuitive Laravel admin panel updates.

View on GitHub
Deep Wiki
Context7

Getting Started

archilex/filament-toggle-icon-column is a small Filament table-column package: it wraps Filament's IconColumn and renders booleans as a pair of toggle icons (typically a green check / red x) with sensible defaults, so you don't hand-configure IconColumn::make()->boolean()->trueIcon(...) on every resource.

Minimal setup:

composer require archilex/filament-toggle-icon-column

There is no service provider, no config file, and no migration — it's a pure column class. Look first at the class itself (Archilex\FilamentToggleIconColumn\Columns\ToggleIconColumn) and the package README; the entire public API is a handful of fluent setters, so reading the source takes about five minutes and is usually faster than guessing.

First use case — replace a redundant boolean icon column in a resource table:

use Archilex\FilamentToggleIconColumn\Columns\ToggleIconColumn;

public static function table(Table $table): Table
{
    return $table
        ->columns([
            TextColumn::make('name'),
            ToggleIconColumn::make('is_active')
                ->label('Active'),
        ]);
}

The column assumes a boolean-ish value; if your attribute is a nullable timestamp or an enum, cast it to bool on the model or use ->getStateUsing(fn ($record) => (bool) $record->... ) before reaching for anything heavier.

Implementation Patterns

Resource-level default. The highest-leverage move is consistency: use ToggleIconColumn for every boolean flag in the app (is_active, is_featured, is_verified, published) instead of mixing IconColumn and TextColumn. That gives you one place to change icon semantics globally — e.g. extract a private static helper on a base resource class:

protected static function boolColumn(string $name): ToggleIconColumn
{
    return ToggleIconColumn::make($name)
        ->trueColor('success')
        ->falseColor('danger');
}

Color/icon customisation per domain. Semantics differ: a "failed" job arguably shouldn't render as a red x identical to a disabled user. Override per column with ->trueIcon(), ->falseIcon(), ->trueColor(), ->falseColor() rather than building a parallel abstraction.

Paired with ToggleColumn / actions. A read-only toggle icon is often the display half of an editable control. Common pattern: ToggleIconColumn in the table, and either a ToggleTableColumn or an Action in the row for mutating state. Keep the column non-interactive — don't stack click handlers on it if you also have a row action, or clicks become ambiguous.

Nullable / tri-state handling. For "unknown" values (e.g. null consent), map explicitly via ->getStateUsing() and consider a third visual state or a placeholder(), since the package's defaults assume a two-state boolean.

Infolists and relation tables. Because it extends Filament's IconColumn, it slots into relation managers and, where the Filament version allows, infolist schemas. Verify against your Filament major version before relying on the infolist usage.

v3.2.0 upgrade note. This release is essentially Laravel 12 compatibility plus CI/dependency bumps. There are no new column features, no deprecations, and no signature changes announced. If you are moving an app to Laravel 12, bump this package at the same time as Filament and your other table extensions, then re-render the affected resources — the risk here is Filament-version drift, not this package's API.

Gotchas and Tips

Version alignment with Filament. This package is a thin subclass of Filament\Tables\Columns\IconColumn. Its supported Filament major is the real compatibility boundary; the Laravel 12 note in v3.2.0 doesn't imply compatibility with every Filament major. Before upgrading Laravel or Filament, check the package's composer.json constraints, not just the changelog headline.

Don't expect a config file. The v3.2.0 changelog is dependabot bumps and a Laravel 12 PR — no vendor:publish assets were ever part of this package. If you find yourself looking for a config to change default icons, stop and override per column.

Casting is your job. '1', 1, 'true', and true will not all behave identically. Cast booleans on the model ($casts = ['is_active' => 'boolean']) rather than relying on PHP truthiness in the column; this is the single most common source of "the icon is wrong" reports.

Debugging wrong icons. Work outward: ->getStateUsing(fn ($record) => dd($record->is_active)) in the column, then remove. If the raw value is correct but the icon isn't, you've overridden trueIcon()/falseIcon() somewhere upstream (often a base resource helper) — grep for the column name.

Accessibility and density. Icons-only columns convey nothing to screen readers by default. Add ->label() (and a tooltip where supported) so the column keeps a header and the value stays interpretable; also watch ->size() in dense tables, since default icon sizing can crowd rows next to text columns.

Test the rendered HTML, not the class. Livewire table tests asserting assertTableColumnExists() won't catch icon/colour regressions from a Filament upgrade. Use assertCanSeeTableRecords() plus HTML assertions on the icon name for the columns that actually matter operationally.

Extension point is inheritance. If you need shared behaviour across the app, subclass ToggleIconColumn yourself — the package has no plugin/hook system. Keep such a subclass tiny; it's a wrapper around a wrapper, and over-abstracting it makes Filament upgrades harder to diagnose.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console