pxlrbt/filament-favicon 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pxlrbt/filament-favicon

Composer 安装命令:

composer require pxlrbt/filament-favicon

包简介

Favicon Column and Entry for Filament

README 文档

README

header

Filament Favicon

Latest Version on Packagist Software License GitHub Workflow Status Total Downloads

Installation via Composer

composer require pxlrbt/filament-favicon

Features

FaviconColumn

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))

FaviconEntry

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))

Configuration

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',
    ],
];

Favicon Drivers

This package includes two favicon drivers:

IconHorse (default)

  • Dedicated favicon service with enhanced reliability
  • Free tier: up to 1,000 lookups per month
  • Paid plans available for higher volumes
  • Class: \pxlrbt\FilamentFavicon\Drivers\IconHorse::class

DuckDuckGo

  • Uses DuckDuckGo's search engine index to fetch favicons
  • No rate limits or usage restrictions
  • Free and unlimited
  • Class: \pxlrbt\FilamentFavicon\Drivers\DuckDuckGo::class

To switch drivers, update the driver option in your config file.

Clear Favicons

Clear all cached favicons:

php artisan favicons:clear

Contributing

If you want to contribute to this packages, you may want to test it in a real Filament project:

  • Fork this repository to your GitHub account.
  • Create a Filament app locally.
  • Clone your fork in your Filament app's root directory.
  • In the /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.

Credits

统计信息

  • 总下载量: 6.7k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 20
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 20
  • Watchers: 0
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-11-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固