bezhansalleh / filament-addons
一套具有不同设计和额外功能的丝杠组件插件
1.0.1
2023-03-05 07:47 UTC
Requires
- php: ^8.0|^8.1
- filament/filament: ^2.0
- illuminate/contracts: ^8.0|^9.0|^10.0
- spatie/laravel-package-tools: ^1.9.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.8
- nunomaduro/collision: ^6.0|^7.0
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^7.0
- pestphp/pest: ^1.21
- pestphp/pest-plugin-laravel: ^1.1
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-09-09 13:45:24 UTC
README

丝杠插件
一套具有额外功能和清新外观的丝杠组件
- 药丸(标签药丸)
- 芯片列
- 即将推出...
安装
您可以通过composer安装此包
composer require bezhansalleh/filament-addons
管理面板 & 表单
药丸(标签药丸)
Pills
基本上与现有的Tabs
表单组件类似,但功能更丰富
- 可以包含图标 🥳
- 可以包含徽章 💯
- 有全新的外观 💅
- 可以标记为活动状态 ✅
use BezhanSalleh\FilamentAddons\Forms\Components; Components\Pills::make('Heading') ->activePill(2) // pill two will be the default active one ->pills([ Components\Pills\Pill::make('Shield') ->icon('heroicon-o-shield-check') ->badge('7.2K') ->schema([ Forms\Components\View::make('static-hello') ]), Components\Pills\Pill::make('Google Analytics') ->schema([ Forms\Components\View::make('static-why') ->fieldWrapperView(fn() => view('welcome')), ])->columns(1), Components\Pills\Pill::make('Translations Manager') ->icon('heroicon-o-sparkles') ->schema([ Forms\Components\View::make('static-view'), ... ]), ]),
注意 以下代码片段在资源表或页面表单中将渲染为:
Screen.Recording.2022-07-10.at.6.27.57.AM.mov
管理面板 & 表格
芯片列
ChipColumn
基本上与现有的Badge
列类似,但改变了外观和图标设计
use BezhanSalleh\FilamentAddons\Tables\Columns\ChipColumn; ChipColumn::make('role') ->label('Role(Chip)') ->colors([ 'primary', 'success' => fn ($state): bool => $state === 'admin', 'warning' => fn ($state): bool => $state === 'manager', 'danger' => fn ($state): bool => $state === 'editor', ]) ->icons([ 'heroicon-o-x', 'heroicon-s-shield-check' => fn ($state): bool => $state === 'admin', 'heroicon-o-user' => fn ($state): bool => $state === 'manager', 'heroicon-o-sparkles' => fn ($state): bool => $state === 'editor' ]) ->iconPosition('before')
- 使用
invert()
使其突出
可选地,您可以使用以下方式发布视图:
php artisan vendor:publish --tag="filament-addons-views"
测试
composer test
变更日志
请参阅变更日志以获取有关最近更改的更多信息。
贡献
如果您想为此包做出贡献,您可能想在真实的Filament项目中测试它
- 将该存储库分支到您的GitHub账户
- 在本地创建一个Filament应用程序
- 将您的分支克隆到Filament应用程序的根目录中
- 在
/filament-addons
目录中,为您的修复创建一个分支,例如fix/error-message
。
在您的应用程序的composer.json
中安装包
"require": { "bezhansalleh/filament-addons": "dev-fix/error-message as main-dev", }, "repositories": [ { "type": "path", "url": "filament-addons" } ]
现在,运行composer update
。
有关详细信息,请参阅CONTRIBUTING。
安全漏洞
请查阅我们的安全策略,了解如何报告安全漏洞。
致谢
许可证
MIT许可证(MIT)。有关更多信息,请参阅许可证文件。