mokhosh/filament-rating
Composer 安装命令:
composer require mokhosh/filament-rating
包简介
Add rating fields and columns to Filament forms and tables
README 文档
README
Add beautiful and customizable rating fields and columns to Filament forms and tables.
| Form Component | Table Column | Infolist Entry |
|---|---|---|
![]() |
![]() |
![]() |
Installation
You can install the package via composer:
composer require mokhosh/filament-rating
Publish the assets so the styles are correct:
php artisan filament-rating:install
Usage
You can add a rating field to your forms like this:
use Mokhosh\FilamentRating\Components\Rating; $form->schema([ Rating::make(), ]);
You can add a rating column to your tables like this:
use Mokhosh\FilamentRating\Columns\RatingColumn; $table->schema([ RatingColumn::make(), ]);
You can add a rating entry to your infolists like this:
use Mokhosh\FilamentRating\Entries\RatingEntry; $infolist->schema([ RatingEntry::make(), ]);
Themes
You can choose the theme.
The default value is: RatingTheme::Simple.
The accepted values are: RatingTheme::Simple, RatingTheme::HalfStars, like this:
use Mokhosh\FilamentRating\RatingTheme; $form->schema([ Rating::make()->theme(RatingTheme::Simple), ]);
Maximum Stars
You can change the number of total stars.
The default value is 5.
The accepted values are number, like this:
$form->schema([ Rating::make()->stars(10), ]);
Allowing Zero Stars
If you want to allow zero stars to be chosen, you can do so like this:
$form->schema([ Rating::make()->allowZero(), ]);
Customizing The Size
You can customize the size of the stars.
The default value is md.
The accepted values are: xs, sm, md, lg and xl, like this:
$form->schema([ Rating::make()->size('sm'), ]);
Customizing Colors
You can customize the color of the stars by choosing one of the Filament theme colors.
The default value is primary.
The accepted values are: danger, gray, info, primary, success and warning, like this:
$form->schema([ Rating::make()->color('success'), ]);
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
mokhosh/filament-rating 适用场景与选型建议
mokhosh/filament-rating 是一款 基于 Blade 开发的 Composer 扩展包,目前已累计 146.7k 次下载、GitHub Stars 达 82, 最近一次更新时间为 2024 年 03 月 15 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「mokhosh」 「filament-rating」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 mokhosh/filament-rating 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mokhosh/filament-rating 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 mokhosh/filament-rating 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Add kanban boards to your Filament pages
Add Jalali datetime to your filament tables
Add kanban boards to your Filament pages
Add kanban boards to your Filament pages
Add kanban boards to your Filament pages
Alfabank REST API integration
统计信息
- 总下载量: 146.7k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 82
- 点击次数: 22
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-03-15


