husamhammad/voyager-bootstrap-icons-field

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

Maintainers

Package info

github.com/husamhammadcom/voyager-bootstrap-icons-field

Language:Blade

pkg:composer/husamhammad/voyager-bootstrap-icons-field

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2025-10-09 22:19 UTC

This package is auto-updated.

Last update: 2026-03-10 00:04:35 UTC


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