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:
✨ Features
- Zero-config auto-discovery (Laravel 8/9/10/11).
- Bootstrap Icons modal picker with live search and preview.
- Ships with
icons.jsonready-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.jsonexists. - 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
- Add a
VARCHARcolumn to your table, e.g.icon. - In Voyager BREAD, set Type = icon.
- (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
其他信息
- 授权协议: MIT
- 更新时间: 2025-10-09