![]()
composer require pxlrbt/filament-favicon
Display website favicons in your Filament table columns:
use pxlrbt\FilamentFavicon\Filament\FaviconColumn;Â FaviconColumn::make('website')
The column automatically fetches and caches favicons based on the domain value. The state must be a domain name (e.g., example.com).
If you need to extract the domain from a URL, use the state() method:
FaviconColumn::make('website') ->state(fn ($record) => parse_url($record->website, PHP_URL_HOST))
Display website favicons in your Filament infolists:
use pxlrbt\FilamentFavicon\Filament\FaviconEntry;Â FaviconEntry::make('website')
The entry automatically fetches and caches favicons based on the domain value. The state must be a domain name (e.g., example.com).
If you need to extract the domain from a URL, use the state() method:
FaviconEntry::make('website') ->state(fn ($record) => parse_url($record->website, PHP_URL_HOST))
Publish the config file:
php artisan vendor:publish --tag=filament-favicon-config
Available options:
return [ // Favicon fetcher service (DuckDuckGo or IconHorse) 'diver' => \pxlrbt\FilamentFavicon\Drivers\IconHorse::class, // How long to keep favicons before re-fetching 'stale_after' => CarbonInterval::week(1), // Storage configuration 'storage' => [ 'disk' => 'public', 'directory' => 'favicons', ],];
This package includes two favicon drivers:
IconHorse (default)
\pxlrbt\FilamentFavicon\Drivers\IconHorse::class
DuckDuckGo
\pxlrbt\FilamentFavicon\Drivers\DuckDuckGo::class
To switch drivers, update the driver option in your config file.
Clear all cached favicons:
php artisan favicons:clear
If you want to contribute to this packages, you may want to test it in a real Filament project:
/filament-favicon directory, create a branch for your fix, e.g. fix/error-message.Install the packages in your app's composer.json:
"require": { "pxlrbt/filament-favicon": "dev-fix/error-message as main-dev",},"repositories": [ { "type": "path", "url": "filament-favicon" }]
Now, run composer update.
Dennis, a Filament core-team member, is dedicated to delivering high-quality plugins for your Filament projects. He is a freelance full-stack developer who works on several Laravel projects either individually or as part of small teams. In his work, he utilizes both Livewire and Inertia.