initials, pixel-art, adventurer). Ideal for projects requiring customizable, scalable avatars without external dependencies.composer require leek/filament-dicebear
php artisan vendor:publish --tag=filament-dicebear-config
config/filament-dicebear.php for API keys, default styles, or self-hosted endpoints.# Run DiceBear server (Node.js required)
npx @dicebear/core@latest --template [style] --out format --out ext --out [output]
AppPanelProvider:
->defaultAvatarProvider(DiceBearProvider::class)
->plugins([DiceBearPlugin::class])
getAvatar() methods or config:
use Leek\FilamentDiceBear\Enums\DiceBearStyle;
public static function getAvatar(): string {
return DiceBearStyle::PixelArt->value;
}
.env.filament-dicebear.php) simplifies updates across environments.php artisan cache:clear or Filament’s cache management tools.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| DiceBear API downtime (cloud) | Missing avatars | Fallback to placeholder or self-hosted instance. |
| Cache corruption | Stale avatars | Implement cache invalidation on user updates. |
| Self-hosted server crash | No avatar generation | Use cloud API as backup or monitor server health. |
| Filament upgrade breaks provider | Avatars stop rendering | Test with Filament beta releases; check changelogs. |
| High traffic without caching | API throttling/rate limits | Enable caching and scale DiceBear server. |
AppPanelProvider.How can I help you explore Laravel packages today?