bugo / moonshine-fontawesome-field
MoonShine 的 Font Awesome 图标选择字段
0.1
2024-05-20 12:39 UTC
Requires
- php: ^8.1|^8.2
- owenvoke/blade-fontawesome: ^2.6
Requires (Dev)
- moonshine/moonshine: ^2.10.0
- orchestra/testbench: ^8.0
- pestphp/pest: ^2.34
- pestphp/pest-plugin-laravel: ^2.2
- rector/rector: ^1.0
Conflicts
- moonshine/moonshine: <2.0
README
为 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 模板中的图标时,请确保启用 缓存。
贡献
欢迎提交拉取请求。对于重大更改,请先提出问题,讨论您希望进行更改的内容。
请确保根据需要更新测试。