- How do I install this Filament logo column package in Laravel?
- Run `composer require tinusg/filament-company-logo-column`, then add your Logo.dev publishable key to `config/services.php` under the `logo_dev` array and set it in your `.env` file. No migrations or model changes are needed.
- Does this package work with Filament v3 or v4, or only v5?
- This package is built for Filament v5.x only. If you're using v3 or v4, you’d need to create a compatibility layer or explore alternatives like custom Filament columns with direct image rendering.
- What happens if Logo.dev’s API is down or my key is invalid?
- The column gracefully degrades to a neutral placeholder div if no valid Logo.dev key is configured or if the API fails. There’s no broken image icon or error state exposed to users.
- Can I customize the size, format, or theme of the logos?
- Yes, you can configure the logo size (e.g., `size(48)`), format (e.g., `format('webp')`), theme (e.g., `theme('dark')`), and even set a fallback like a monogram using methods like `fallback('monogram')`.
- How does this handle URLs with `www.` or subdomains like `sub.example.com`?
- The package automatically strips `www.` prefixes and normalizes domains, but subdomains (e.g., `sub.example.com`) are passed as-is to Logo.dev. For complex cases, use the `domain()` method with a closure to override the input.
- Is there a way to lazy-load logos for better performance?
- Yes, use the `lazy()` method to enable lazy loading. This defers logo rendering until the row is scrolled into view, improving initial table load times, especially for large datasets.
- Can I use this for public-facing websites or only admin dashboards?
- This package is optimized for admin dashboards where occasional API latency (~50–200ms) is acceptable. For public sites, consider caching logos locally (e.g., Redis) or using a fallback like Google Favicon API to avoid Logo.dev’s rate limits.
- What if my company logos are sensitive data under GDPR/CCPA?
- Review Logo.dev’s terms of service to ensure compliance with your data protection policies. The package doesn’t store or process logos locally, so risk is limited to Logo.dev’s handling of your data.
- How do I add a tooltip showing the company name on hover?
- Use the `tooltip()` method with a closure that returns the company name or any other field. For example, `tooltip(fn ($record) => $record->name)` will show the name when hovering over the logo.
- Are there alternatives if I don’t want to use Logo.dev’s API?
- For full control, you could build a custom Filament column using Laravel’s `Html` helper to render `<img>` tags with direct URLs or a local caching layer. However, this requires handling edge cases like favicon extraction and domain normalization yourself.