定制 elemind/flux-blade-icons 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

elemind/flux-blade-icons

Composer 安装命令:

composer require elemind/flux-blade-icons

包简介

Import third-party Blade icon packages into Flux by generating Flux-compatible Blade icon views.

README 文档

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

flux-blade-icons imports SVGs from third-party Blade icon packages and generates Flux-compatible Blade icon views inside your Laravel application.

The package is built for projects that already use Flux and want to reuse the Blade icon ecosystem without manually copying SVG files. It ships with a large registry of supported icon packages, lets you add or override icon sets through configuration, caches remote icon lists for the interactive importer, and writes the generated views to your application so they can be versioned with the rest of your codebase.

What The Package Does

  • Imports icons from supported Blade icon packages.
  • Generates local Flux-compatible Blade views under resources/views/flux/icon by default.
  • Supports both interactive imports and direct command-line imports.
  • Caches fetched icon lists to speed up repeated imports.
  • Lets you register custom icon sets or override built-in ones.

Installation

Install the package from Packagist with Composer:

composer require elemind/flux-blade-icons

Laravel package discovery will register the service provider automatically.

Publish The Configuration

If you want to change the output path, cache TTL, or icon set registry, publish the configuration file:

php artisan vendor:publish --tag="flux-blade-icons-config"

This will create config/flux-blade-icons.php.

Configuration

The published configuration contains four main options:

return [
    'output_path' => resource_path('views/flux/icon'),

    'cache_ttl' => 86400,

    'default_icon_sets' => [
        // Built-in icon sets shipped with the package.
    ],

    'icon_sets' => [
        // Your custom icon sets or overrides.
    ],
];

output_path

Defines where generated Flux icon Blade views will be stored.

Default:

resource_path('views/flux/icon')

cache_ttl

Defines how long fetched icon lists should remain cached, in seconds.

Default:

86400

default_icon_sets

Contains the built-in registry shipped with the package. This includes many Blade icon packages out of the box, such as Heroicons, Feather Icons, Bootstrap Icons, and others.

icon_sets

Use this section to add your own icon sources or override one of the built-in keys without editing the package defaults.

Example:

'icon_sets' => [
    'custom-icons' => [
        'name' => 'Custom Icons',
        'url' => 'https://icons.example.com',
        'svg' => 'https://cdn.example.com/icons/',
    ],
],

Each icon set must define:

  • name: the label shown in the interactive command.
  • url: the package or documentation URL shown to the user.
  • svg: the base URL used to fetch individual SVG files.

Available Commands

The package registers two Artisan commands:

php artisan flux:blade-icons
php artisan flux:blade-icons:clear-cache

Import Icons

Use flux:blade-icons to generate one or more Flux-compatible Blade views from a configured icon set.

Fully interactive import

Choose the icon package first, then search and select icons interactively:

php artisan flux:blade-icons

Interactive import screenshot Icon galley demo

Import a single icon from a specific set

php artisan flux:blade-icons plus --set=blade-feather-icons

Import multiple icons in one command

php artisan flux:blade-icons plus minus x --set=blade-feather-icons

Import a nested icon

Some icon packages store icons inside subdirectories. In that case, use the relative icon path:

php artisan flux:blade-icons outline/arrow-left --set=blade-heroicons

Refresh the remote icon list before importing

Use --fresh to bypass the cached icon list:

php artisan flux:blade-icons --set=blade-heroicons --fresh

Interactive fallback for non-GitHub sources

If an icon set is not hosted on GitHub, or if the GitHub API cannot be reached, the command falls back to manual icon name entry. You can still import icons as long as the configured svg URL points to valid SVG files.

Clear Cached Icon Lists

Use flux:blade-icons:clear-cache to remove cached icon lists used by the importer.

Clear the cache for all registered icon sets

php artisan flux:blade-icons:clear-cache

Clear the cache for one icon set only

php artisan flux:blade-icons:clear-cache --set=blade-feather-icons

Generated Component Usage

After importing an icon, the package tells you the component name to use in your Flux views.

If you import:

php artisan flux:blade-icons plus --set=blade-feather-icons

You can use it like this:

<flux:icon.blade-feather-icons.plus />

If you import a nested icon such as:

php artisan flux:blade-icons outline/arrow-left --set=blade-heroicons

You can use it like this:

<flux:icon.blade-heroicons.outline.arrow-left />

Notes

  • Generated icons are stored as local Blade views in your application.
  • If an icon already exists, the import command asks whether it should be overwritten.
  • The generated templates adapt the imported SVG to Flux icon conventions.

Testing

composer test

License

MIT. See LICENSE.md for details.

elemind/flux-blade-icons 适用场景与选型建议

elemind/flux-blade-icons 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 1, 最近一次更新时间为 2026 年 03 月 23 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「flux」 「laravel」 「icons」 「svg」 「blade-icons」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 elemind/flux-blade-icons 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 elemind/flux-blade-icons 我们能提供哪些服务?
定制开发 / 二次开发

基于 elemind/flux-blade-icons 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 39
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-23