welkervinicius/nova-fa-icon
Laravel Nova package that adds Font Awesome icon support, providing a field/component for selecting and displaying Font Awesome icons in Nova resources and forms for simple admin panel integration.
composer require <vendor>/nova-fa-icon:^1.1
php artisan vendor:publish --tag=nova-fa-icon-config
php artisan vendor:publish --tag=nova-fa-icon-lang
php artisan nova:publish
config/nova-fa-icon.php (icon set / default set) and resources/lang/ (now includes en, pt_BR, es, it, ru). The README is the fastest reference for the field namespace and registration.fields():
use Vendor\NovaFaIcon\NovaFaIcon;
public function fields(NovaRequest $request)
{
return [
NovaFaIcon::make('Icon', 'icon')
->rules('required', 'string', 'max:255'),
];
}
The field stores the selected icon class (e.g. fa-solid fa-star) as a plain string column, so it works with Text/String migrations out of the box.->help() and validation to keep stored values predictable.<i class="{{ $resource->icon }}"></i>. Keep the class string as the single source of truth rather than storing an enum.__('nova-fa-icon::messages.key'). To brand or reword, publish the lang files and override under lang/vendor/nova-fa-icon/{locale}/messages.php rather than editing vendor code.pt_BR, es, it, ru catalogs mean the picker UI labels localize automatically based on app()->getLocale(). For locales not shipped, copy en/messages.php into your overrides and translate the keys — no code changes needed.__() calls in your Vue labels so translations stay consistent with the field.$this->withSession(['locale' => 'es']) or App::setLocale('es') before rendering the form, verifying the new catalogs load.nova-fa-icon::messages.key previously rendered as literal text. v1.1.0 switches to PHP-based namespaced translations, the stable approach across Laravel 10/11/12. If you pinned 1.0.x, that bug is your symptom.php artisan optimize:clear (and config:clear, view:clear) — otherwise the old broken loading path can persist.lang/vendor/nova-fa-icon/{locale}/messages.php and that the package service provider's loadTranslationsFrom() namespace (nova-fa-icon) matches. A stray space or wrong folder name silently falls back to English.it catalog won't error — it will show English. Verify with __('nova-fa-icon::messages.key') directly in tinker under the target locale.php artisan nova:publish. A "picker shows old labels" report is almost always a stale published asset, not a translation bug.^1.1 and run your Nova test suite after upgrading; older Nova versions are untested.messages.php into the vendor lang path. Keep keys identical to en so future releases don't break your overrides.How can I help you explore Laravel packages today?