bugo/moonshine-fontawesome-field 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

bugo/moonshine-fontawesome-field

最新稳定版本:2.1.2

Composer 安装命令:

composer require bugo/moonshine-fontawesome-field

包简介

Font Awesome icons selection field for MoonShine

README 文档

README

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
4.0+ 2.x

Installation

composer require bugo/moonshine-fontawesome-field

Usage

You can use IconSelect field in your resources:

<?php

declare(strict_types=1);

namespace App\MoonShine\Resources;

use Bugo\MoonShine\FontAwesome\Fields\IconSelect;
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 [
            IconSelect::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.

How to update icon sets

Once the package is installed, run these commands:

pnpm add @fortawesome/fontawesome-free -D
php artisan moonshine:update-fa-icons

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.

统计信息

  • 总下载量: 37
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-05-20