lartisan/filament-rating-tool
Composer 安装命令:
composer require lartisan/filament-rating-tool
包简介
Rating Tool is a FilamentPHP plugin meant to provide a set of tools for measuring or rating different resources of your app.
关键字:
README 文档
README
Filament Rating Tool is a FilamentPHP plugin meant to provide a set of tools for measuring or rating different resources of your app.
What's different from other (star) rating tools?
Well, we thought of giving a user the possibility to choose an icon, depending on the context of the rating.
For example, if you want to rate a movie, you can use a star icon, if you want to rate a book, you can use a book icon, if you want to provide the number of persons that can occupy a hotel room, you can use a user icon ... and so on, you get the idea. Any icon provided by Filament can be user for rating / measuring.
Also, we made it possible for a user to choose their on size for the icons, the number of icons to be displayed and also the color for the icons. Yeah, you can set different colors for the icons, depending on the rating value.
You can check some examples below or try it yourself on the demo app.
Installation
You can install the package via composer:
composer require lartisan/filament-rating-tool
Optionally, you can publish the views using
php artisan vendor:publish --tag="filament-rating-tool-views"
Form Usage
When preparing a form, you need to define a RatingInput field and, optionally, make some configurations:
RatingInput::make('rating') ->size('xl') ->maxValue(5) ->icon('heroicon-o-stop') ->color(fn (int $state): string => match ($state) { 1 => 'danger', 2 => 'warning', 3 => 'info', 4 => 'primary', 5 => 'success', default => 'gray', }),
These are all the possible methods one can use to configure this field. As you can see, you can provide a maxValue for your input, so if you want to match some custom color based on the $state, you'll need the same amount of colors. Of course, one can only choose one color for all the symbols of the field
RatingInput::make('rating') ->color('warning') // ...
Table Usage
Similar to forms, there is a dedicated column for displaying the measurement value...
RatingColumn::make('rating') ->size('xs') ->maxValue(5) ->icon('heroicon-s-star') ->color(fn (int $state): string => match ($state) { 1 => 'danger', 2 => 'warning', 3 => 'info', 4 => 'primary', 5 => 'success', default => 'gray', }), // ...
Infolist Usage
... and another one to display the infolist when viewing the records
RatingEntry::make('rating') ->columnSpan(2) ->size('lg') ->maxValue(5) ->icon('heroicon-s-user') ->color(fn (int $state): string => match ($state) { 1 => 'danger', 2 => 'warning', 3 => 'info', 4 => 'primary', 5 => 'success', default => 'gray', }), // ...
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.
lartisan/filament-rating-tool 适用场景与选型建议
lartisan/filament-rating-tool 是一款 基于 Blade 开发的 Composer 扩展包,目前已累计 89 次下载、GitHub Stars 达 5, 最近一次更新时间为 2023 年 12 月 23 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「filament plugin」 「filament text input」 「filament text column」 「filament text entry」 「filament-rating-tool」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 lartisan/filament-rating-tool 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 lartisan/filament-rating-tool 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 lartisan/filament-rating-tool 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
CakePHP 4.x AdminLTE Theme.
Texy converts plain text in easy to read Texy syntax into structurally valid (X)HTML. It supports adding of images, links, nested lists, tables and has full support for CSS. Texy supports hyphenation of long words (which reflects language rules), clickable emails and URL (emails are obfuscated again
Common libraries used by Zimbra Api
Text file manipulation
Plain text view engine
Plugin for YOURLS. Default tools to use in some laemmi plugins
统计信息
- 总下载量: 89
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 22
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-12-23


