定制 husamhammad/voyager-bootstrap-icons-field 二次开发

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

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

husamhammad/voyager-bootstrap-icons-field

最新稳定版本:v1.0.0

Composer 安装命令:

composer require husamhammad/voyager-bootstrap-icons-field

包简介

Bootstrap Icons picker FormField for Voyager with zero-config + optional one-shot installer.

README 文档

README

A Bootstrap Icons picker custom FormField for Voyager (Laravel Admin).
Provides a clean modal UI with search, preview, and full integration in BREAD.

📸 Screenshots

Here are some previews of the icon picker inside Voyager BREAD:

Icon Picker Modal

Browse View Example

✨ Features

  • Zero-config auto-discovery (Laravel 8/9/10/11).
  • Bootstrap Icons modal picker with live search and preview.
  • Ships with icons.json ready-to-use (no extra steps).
  • RTL friendly (Arabic, Persian, etc).
  • Optional one-shot installer to auto-wire local provider if needed.
  • Supports Browse/Read display via custom view.

🚀 Installation

composer require husamhammad/voyager-bootstrap-icons-field

Optional: publish assets if you want to overwrite icons.json:

php artisan vendor:publish --tag=public --force

⚙️ One-shot Installer (optional)

If icon field type does not appear in BREAD automatically, run:

php artisan voyager:icon-field:install

This will:

  • Create app/Providers/VoyagerFormFieldsServiceProvider.php (if missing).
  • Register it in config/app.php.
  • Ensure public/vendor/bootstrap-icons/icons.json exists.
  • Clear caches.

✅ Verify installation

php artisan voyager:icon-field:test

Expected output:

View loaded: YES
Class autoload: YES
icons.json present: YES

🔧 Usage in BREAD

  1. Add a VARCHAR column to your table, e.g. icon.
  2. In Voyager BREAD, set Type = icon.
  3. (Optional) For Browse/Read view, add this in Details:
    { "view": "voyager-icon-field::formfields.icon-display" }

Now you can pick an icon in Add/Edit forms and display it in Browse/Read.

🖼 Example in Blade

<i class="bi bi-{{ $model->icon }}"></i>

📝 License

MIT © Husam Hammad

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: Blade

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-10-09