bugo/moonshine-fontawesome-field

Font Awesome icons selection field for MoonShine

0.1 2024-05-20 12:39 UTC

This package is auto-updated.

Last update: 2024-10-20 13:27:22 UTC


README

PHP Coverage Status

Convenient Font Awesome icons selection field for MoonShine

Installation

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\Resources\ModelResource;

/**
 * @extends ModelResource<Custom>
 */
class CustomResource extends ModelResource
{
    public function fields(): array
    {
        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.