Weave Code
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 Company Logo Column Laravel Package

tinusg/filament-company-logo-column

Filament table column that displays a company logo via Logo.dev from a URL or bare domain. Supports tooltips (e.g., company name), domain overrides, sizing and format options, themes, fallbacks, and lazy loading. Configurable Logo.dev publishable key.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

  • Pros:

    • Lightweight & Decoupled: Extends Filament’s native Column class, requiring minimal customization. No database changes or complex dependencies.
    • Stateless Design: Leverages Logo.dev’s API and browser caching, avoiding local storage or proxying overhead. Ideal for admin dashboards where real-time logo updates aren’t critical.
    • Flexible Input Handling: Normalizes URLs/FQDNs (e.g., strips www., rejects IPs) without forcing schema changes in existing models.
    • Progressive Enhancement: Graceful degradation (neutral placeholder) ensures usability even with missing keys or invalid inputs.
    • Filament-Aligned: Follows Filament’s patterns (e.g., tooltip(), label()), reducing learning curve for teams familiar with the framework.
  • Cons:

    • Third-Party Dependency: Logo.dev’s API is a single point of failure (rate limits, downtime, or pricing changes could disrupt functionality).
    • No Local Caching: Relies entirely on Logo.dev’s caching, which may not suit high-traffic tables or offline-first apps.
    • Limited Customization: Placeholder styling is static (neutral <div>); advanced use cases (e.g., custom monogram rendering) require manual overrides.

Integration Feasibility

  • Low Barrier to Entry:
    • Composer Install: Single composer require + .env key setup.
    • Zero Model Changes: Works with existing website/domain columns without migrations.
    • Blade Overrides: Optional vendor:publish for theming (e.g., custom placeholders).
  • Filament 5.x Only: Requires Filament v5.x; teams using v3/v4 would need compatibility layers.
  • PHP 8.2+: Aligns with modern Laravel/PHP stacks but may exclude legacy projects.

Technical Risk

  • API Risk:
    • Logo.dev’s free tier has rate limits (100 requests/minute). High-traffic tables could hit costs or throttling.
    • Mitigation: Implement a local cache (e.g., Redis) for frequent domains or monitor usage.
  • Data Validation:
    • Input normalization (e.g., rejecting IPs) is handled, but edge cases (e.g., sub.example.com) may need explicit handling.
  • Performance:
    • Logo.dev’s API latency (~50–200ms) could slow table rendering for large datasets.
    • Mitigation: Use lazy() for offscreen logos or preload critical logos via JavaScript.
  • Security:
    • No input sanitization for arbitrary URLs (e.g., javascript:alert(1)). Risk is mitigated by Logo.dev’s domain validation, but teams should validate upstream if using raw user input.

Key Questions

  1. Logo.dev Reliability:
    • Does the team have a backup plan for Logo.dev downtime (e.g., fallback to Google Favicon API or local storage)?
    • Are there budget constraints for Logo.dev’s paid tiers if usage scales?
  2. Data Sensitivity:
    • Are company logos/URLs PII or subject to GDPR/CCPA? Logo.dev’s terms should be reviewed for compliance.
  3. Customization Needs:
    • Are there requirements for non-standard placeholders (e.g., initials from company names) or clickable logos?
  4. Offline Support:
    • Is the app used in offline environments? If so, local caching or a fallback mechanism is needed.
  5. Filament Version Lock:
    • Is Filament v5.x strictly required, or could a compatibility layer be built for older versions?

Integration Approach

Stack Fit

  • Ideal For:
    • Filament 5.x Admin Panels: Perfect for tables listing companies/clients (e.g., CRM, SaaS dashboards).
    • Laravel/PHP Projects: Minimal overhead; no Node.js/React dependencies.
    • Low-Maintenance UIs: Stateless design reduces backend load.
  • Less Suitable For:
    • High-Frequency Public Faces: API latency and third-party dependency risks are unacceptable.
    • Offline-First Apps: No built-in caching mechanism.
    • Highly Customizable Logos: Teams needing dynamic placeholders or SVG manipulation may need extensions.

Migration Path

  1. Discovery Phase:
    • Audit existing tables for columns containing URLs/domains (e.g., website, company_url).
    • Validate that these fields can be normalized (e.g., no malformed data like IPs or non-FQDNs).
  2. Pilot Integration:
    • Start with a non-critical table (e.g., "Companies" resource).
    • Test with a subset of records to verify:
      • Logo rendering for known/unknown domains.
      • Placeholder behavior with missing keys.
      • Performance impact on table load times.
  3. Configuration:
    • Set up Logo.dev key in .env and publish config/views if theming is needed.
    • Configure global defaults (e.g., size, theme) in config/filament-company-logo-column.php.
  4. Rollout:
    • Replace TextColumn with CompanyLogoColumn in Filament resources.
    • Example migration:
      - TextColumn::make('website')->url(),
      + CompanyLogoColumn::make('website')
      +     ->tooltip(fn ($record) => $record->name)
      +     ->size(48),
      
  5. Fallback Testing:
    • Temporarily remove the Logo.dev key to ensure graceful degradation.
    • Test with invalid inputs (e.g., 192.168.1.1, nonexistent.tld).

Compatibility

  • Filament 5.x: Native support; no modifications needed.
  • Laravel 10+: PHP 8.2+ compatibility ensures smooth integration.
  • Custom Columns: Can be extended via vendor:publish for:
    • Custom Blade views (e.g., SVG placeholders).
    • Additional methods (e.g., clickable() for linking to URLs).
  • Monorepos: If using Laravel Mix/Vite, ensure no CSS conflicts with Filament’s styles.

Sequencing

  1. Phase 1: Core Integration (1–2 days):
    • Install package, configure Logo.dev key, and replace one TextColumn with CompanyLogoColumn.
    • Validate rendering and tooltip functionality.
  2. Phase 2: Optimization (0.5–1 day):
    • Adjust size, format, and lazy settings based on performance testing.
    • Implement local caching if needed (e.g., Redis for frequent domains).
  3. Phase 3: Expansion (1–3 days):
    • Roll out to additional tables/resources.
    • Publish custom views/config if theming is required.
  4. Phase 4: Monitoring (Ongoing):
    • Track Logo.dev API usage/costs.
    • Monitor table load times for performance regressions.

Operational Impact

Maintenance

  • Pros:
    • Minimal Ongoing Work: No image hosting, CDN management, or proxying required.
    • Dependency Updates: MIT-licensed package with clear release notes (check for Filament v5.x compatibility).
  • Cons:
    • Logo.dev Key Rotation: If Logo.dev changes keys, the .env must be updated (automate via CI/CD).
    • API Changes: Logo.dev may modify endpoints/pricing; monitor their changelog.
  • Support:
    • Troubleshooting: Common issues (broken logos, placeholders) are self-documenting (e.g., missing key, invalid domain).
    • Community: Small but active GitHub repo (7 stars, recent releases).

Support

  • Developer Onboarding:
    • Easy: Familiar Filament API; no new concepts for PHP/Laravel devs.
    • Documentation: README is comprehensive; example usage covers 90% of cases.
  • End-User Support:
    • Tooltip Clarity: Hover tooltips (e.g., company names) reduce confusion.
    • Fallback UX: Neutral placeholders are unobtrusive but may require training for users expecting logos.
  • Error Handling:
    • Graceful: No broken images; placeholders maintain table integrity.
    • Logging: Consider logging invalid domains (e.g., 192.168.1.1) for data cleanup.

Scaling

  • Performance:
    • Best Case: Logo.dev’s caching + browser caching reduce load times for repeated views.
    • Worst Case: High-traffic tables with many unique domains may hit Logo.dev’s rate limits.
      • Mitigation:
        • Implement client-side caching (e.g., localStorage for logos).
        • Use lazy() for offscreen logos.
        • Preload logos for critical tables (e.g., via JavaScript).
  • Cost:
    • Logo.dev’s free tier is generous (100 requests/minute), but scale to 100+ concurrent users could incur costs.
    • Monitoring: Track API calls via Logo.dev’s dashboard or a middleware wrapper.
  • **Database Impact
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.
iio/libmergepdf
redaxo/project
zatona-eg/zatona-eg-api
patrickbussmann/oauth2-apple
3brs/enterprise-security-bundle
ardenexal/fhir-models
ardenexal/fhir-validation
dpfx/laravel-livewire-wizards
dmstr/symfony-system-resources-bundle
dmstr/symfony-job-queue-bundle
dmstr/openapi-json-schema-bundle
dmstr/keycloak-security-bundle
dmstr/doctrine-audit-log-bundle
dmstr/api-platform-utils-bundle
dmstr/api-configuration-bundle
chrisdev/ux-components
crudly/encrypted
cuci/prototurk-sdk
gos/pubsub-router-bundle
cuci/prototurk-sdk-symfony