MoonShine MoonShine
EN
← All plugins

MoonShine FontAwesome Field

MoonShine FontAwesome Field is a package for convenient Font Awesome icon selection in the MoonShine admin panel. It supports MoonShine versions 2.0+ and 3.0+ with easy integration and customizable fields.

Rating
Downloads
20
Version
1.2
Last updated
13.03.2025
MoonShine version
v2, v3
Github stars
1
dragomano
Author
dragomano

MoonShine FontAwesome Field

PHP Coverage Status

Convenient Font Awesome icons selection field for MoonShine

Support MoonShine versions

MoonShine This package
2.0+ 0.x
3.0+ 1.x

Installation

composer require bugo/moonshine-fontawesome-field
composer require bugo/moonshine-fontawesome-field

Usage

You can use Icon field in your resources:

<?php
 
declare(strict_types=1);
 
namespace App\MoonShine\Resources;
 
use Bugo\MoonShine\FontAwesome\Fields\Icon;
use MoonShine\Laravel\Resources\ModelResource;
use MoonShine\Contracts\UI\FieldContract;
use MoonShine\Contracts\UI\ComponentContract;
 
/**
* @extends ModelResource<Custom>
*/
class CustomResource extends ModelResource
{
/**
* @return list<ComponentContract|FieldContract>
*/
protected function formFields(): iterable
{
return [
Icon::make('Icon')
->searchable(),
];
}
}
<?php
 
declare(strict_types=1);
 
namespace App\MoonShine\Resources;
 
use Bugo\MoonShine\FontAwesome\Fields\Icon;
use MoonShine\Laravel\Resources\ModelResource;
use MoonShine\Contracts\UI\FieldContract;
use MoonShine\Contracts\UI\ComponentContract;
 
/**
* @extends ModelResource<Custom>
*/
class CustomResource extends ModelResource
{
/**
* @return list<ComponentContract|FieldContract>
*/
protected function formFields(): iterable
{
return [
Icon::make('Icon')
->searchable(),
];
}
}

All use cases of Blade Font Awesome are also available for you.

Caching

When using icons in Blade templates, be sure to enable Caching.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.