ibrahim-bougaoua / filaprogress
这是我包装的filaprogress
v0.1
2024-09-03 21:04 UTC
Requires
- php: ^8.2
- illuminate/contracts: ^10.0||^11.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- larastan/larastan: ^2.9
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.1.1||^7.10.0
- orchestra/testbench: ^9.0.0||^8.22.0
- pestphp/pest: ^2.34
- pestphp/pest-plugin-arch: ^2.7
- pestphp/pest-plugin-laravel: ^2.3
- phpstan/extension-installer: ^1.3
- phpstan/phpstan-deprecation-rules: ^1.1
- phpstan/phpstan-phpunit: ^1.3
- spatie/laravel-ray: ^1.35
README
为 FilamentPHP 提供进度管理包 filaprogress,它提供了一个灵活且易于使用的解决方案,用于在 Filament 管理面板中跟踪和可视化进度。它包括自定义的 Filament 组件,可以直接在您的管理界面中显示线性进度条和圆形进度指示器。此包旨在无缝集成到 Filament 的现有工具中,提供动态可定制的进度条和圆形,以表示任务完成、项目里程碑或任何需要可视化进度跟踪的指标。非常适合通过直观的实时进度显示增强管理仪表板中的用户体验。
安装
您可以通过 composer 安装此包
composer require ibrahim-bougaoua/filaprogress
可选地,您可以使用以下命令发布视图
php artisan vendor:publish --tag="filaprogress-views"
用法
// For infolist use IbrahimBougaoua\FilaProgress\Infolists\Components\CircleProgressEntry; use IbrahimBougaoua\FilaProgress\Infolists\Components\ProgressBarEntry; return $infolist ->schema([ CircleProgressEntry::make('circle') ->getStateUsing(function ($record) { $total = $record->items()->count(); $progress = $record->countPaidItems(); return [ 'total' => $total, 'progress' => $progress, ]; }) ->hideProgressValue(), ProgressBarEntry::make('bar') ->getStateUsing(function ($record) { $total = $record->items()->count(); $progress = $record->countPaidItems(); return [ 'total' => $total, 'progress' => $progress, ]; }) ->hideProgressValue(),
// For table use IbrahimBougaoua\FilaProgress\Tables\Columns\CircleProgress; use IbrahimBougaoua\FilaProgress\Tables\Columns\ProgressBar; return $table ->columns([ CircleProgress::make('circle') ->getStateUsing(function ($record) { $total = $record->items()->count(); $progress = $record->countPaidItems(); return [ 'total' => $total, 'progress' => $progress, ]; }) ->hideProgressValue(), ProgressBar::make('bar') ->getStateUsing(function ($record) { $total = $record->items()->count(); $progress = $record->countPaidItems(); return [ 'total' => $total, 'progress' => $progress, ]; }) ->hideProgressValue(),
测试
composer test
安全漏洞
请查看我们的安全策略以了解如何报告安全漏洞。
致谢
- [Ibrahim Bougaoua](https://github.com/Ibrahim Bougaoua)
- 所有贡献者
许可证
MIT 许可证(MIT)。请参阅许可证文件获取更多信息。