eom-plus/nova-rating-field
Composer 安装命令:
composer require eom-plus/nova-rating-field
包简介
A Laravel Rating Nova field.
README 文档
README
A Star rating field to use in your Laravel Nova apps. This package is highly based on nikaia/nova-rating-field thas is incompatible with Nova4 and looks unmaintained for a while.
This README was written by the original author and we just copy it here and change the package and field name.
Uses vue-star-rating.
Installation
You can install the package in to a Laravel app that uses Nova via composer:
composer require eom-plus/nova-rating-field
Next you can use the Eom-Plus\NovaRatingField\Rating field in your Nova resource.
Usage
public function fields(Request $request) { return [ // ... Rating::make('Rating')->min(0)->max(5)->increment(0.5)->hideFromIndex(), // Defining a custom style for the index page. Rating::make('Rating')->min(0)->max(5)->increment(0.5)->hideRating() ->withStyles([ 'star-size' => 15, 'rounded-corners' => true, ])->onlyOnIndex()->sortable(), // ... ]; }
Defining properties
public function fields(Request $request) { Rating::make('Rating') // Miniumum rating (default: 0) ->min(0) // Maximum rating (default: 5) // This is how the component knows how many stars it should display. ->max(5) // Incremet (default: 1) // Can be float. The underlying eloquent colum must be defined as float in that case. // ie. 0.5 for half stars or 0.01 for fluid stars. ->increment(0.5) // Show rating value next to the stars ->hideRating() }
Customizing styles
You can style the component using withStyles method. Options are passed to the the underlying vue component style props.
Default values are :
public function fields(Request $request) { Rating::make('Rating') ->withStyles([ 'star-size' => 30, 'active-color' => 'var(--primary)', // Primary nova theme color. 'inactive-color' => '#d8d8d8', 'border-color' => 'var(--60)', 'border-width' => 0, 'padding' => 10, 'rounded-corners' => false, 'inline' => false, 'glow' => 0, 'glow-color' => '#fff', 'text-class' => 'inline-block text-80 h-9 pt-2', ]); }
⭐️ Show Your Support
Please give a ⭐️ if this project helped you!
Other Packages You Might Like
- Nova Rating Field - A Star rating Nova 4 field to use in your Laravel Nova apps.
- Nova Feedback Field - An Emoji feedback Nova 4 field to use in your Laravel Nova apps.
- Nova Input Group - A Laravel Nova 4 text field formatted as input group
- Nova Signature - A Laravel Nova 4 signature pad
Take a look to our Github repositories as we have a lot of forked nova components with fixes that are still not merge into main owner branch.
License
The MIT License (MIT). Please see License File for more information.
eom-plus/nova-rating-field 适用场景与选型建议
eom-plus/nova-rating-field 是一款 基于 Vue 开发的 Composer 扩展包,目前已累计 24.32k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2023 年 10 月 19 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「nova」 「laravel」 「Rating」 「field」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 eom-plus/nova-rating-field 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 eom-plus/nova-rating-field 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 eom-plus/nova-rating-field 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A Laravel Nova card that shows you your system information.
A Laravel Nova card.
This Extension integrates a credit check and more made by the LEONEX Risk Management Platform into your order process. Extensive configuration and evaluation options is provided in the Platform
A Laravel Nova package for publishable fields
A Laravel Nova package for translatable fields
A Laravel Nova Image field. you can paste or drag or chose an image
统计信息
- 总下载量: 24.32k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 9
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-10-19