bugo/moonshine-fontawesome-field

MoonShine 的 Font Awesome 图标选择字段

0.1 2024-05-20 12:39 UTC

This package is auto-updated.

Last update: 2024-09-20 13:21:16 UTC


README

PHP Coverage Status

MoonShine 提供便捷的 Font Awesome 图标选择字段

安装

composer require bugo/moonshine-fontawesome-field

用法

您可以在资源中使用 图标 字段

<?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(),
        ];
    }
}

Blade Font Awesome 的所有用例也适用于您。

缓存

在使用 Blade 模板中的图标时,请确保启用 缓存

贡献

欢迎提交拉取请求。对于重大更改,请先提出问题,讨论您希望进行更改的内容。

请确保根据需要更新测试。