Installation
Compatibility
| Filament version | Package version |
|---|---|
| 2.x | 1.x |
| 3.x | 2.x |
| 4.x | 3.x |
| 4.x & 5.x | 4.x |
Badgeable Column requires PHP 8.2 or later and filament/filament.
Install the package
Install with Composer:
composer require awcodes/filament-badgeable-column
The service provider is registered automatically, and there is no configuration file to publish.
Register the views with Tailwind
Badges are rendered from a Blade view in the package, so your Tailwind build has to be able to see that view in order to generate its classes. Add the package as a source in your theme's CSS file:
@source '../../../../vendor/awcodes/filament-badgeable-column/resources/**/*.blade.php';
This applies to both the Panels package and the standalone Tables package. If you are using the standalone packages, add the line to your application's CSS file instead of a panel theme.
Important
Panel users need a custom theme before this line has anywhere to live. If you have not created one yet, follow Creating a custom theme in the Filament documentation first.
The relative path above assumes the conventional theme location, resources/css/filament/<panel>/theme.css. Adjust the number of ../ segments if your theme lives elsewhere — the path has to resolve to vendor/awcodes/filament-badgeable-column/resources from the file it is written in.
Without this step the badges still render, but with none of their colour, shape, or spacing.
Next steps
Continue to Usage to add your first badges.