Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Rating Field

Rating Field Laravel Package

wamesk/rating-field

A lightweight Laravel package that adds a ready-to-use star rating field to your forms, letting users pick a score with a simple, configurable star widget. Quick to install and easy to drop into existing forms.

View on GitHub
Deep Wiki
Context7

A Laravel Nova field.

Frequently asked questions about Rating Field
What is wamesk/rating-field and does it work outside Laravel Nova?
It is a Laravel Nova field that adds a star rating input to your Nova resources, shipped as a Nova Field subclass plus a Vue single-file component. Despite a description that sounds like a general Laravel form package, it only works inside a licensed Nova installation; in a plain Laravel application it does nothing. It has no service layer, domain model, or migrations of its own, and it stores a plain scalar in a column you define.
How do I install wamesk/rating-field in Laravel Nova?
Add it with Composer at an exact pinned version, for example composer require wamesk/rating-field:0.1.0 without a caret, then reference the field class in the fields method of your Nova resource. You still need to create the column, set an Eloquent cast, and add validation rules yourself. End to end this is roughly half a day of work, most of it deciding the storage contract and smoke-testing the widget on one resource.
Is wamesk/rating-field compatible with Laravel Nova 5?
Almost certainly not. The last release was 2023-04-20, which points to Nova 4 and Vue 2, and on Nova 5 with Vue 3 the component will not mount. Porting it costs about the same as scaffolding an in-house field with php artisan nova:field, so on Nova 5 the sensible move is to build rather than port. If you are still on Nova 4, pin the exact release you tested.
How do I configure whole stars versus half stars?
The widget's step setting decides what the UI emits, so you must align the column type, Eloquent cast, validation rule, and client step in a single commit. A decimal(2,1) column paired with an integer validation rule will reject every half-star the UI produces, with an error message staff will not read. Add a round-trip test that saves and re-reads both a whole and a half value before shipping.
What column type and cast should I use for the rating field?
Store a scalar: an integer for whole stars or a decimal such as decimal(2,1) for half stars, with a matching cast so standard Laravel validation, factories, and index sorting keep working unchanged. Decide early whether unrated is a distinct state from zero, which usually means a nullable column and a nullable validation rule. Factories should never need to know about the field; if they do, presentation has leaked into the domain.
Is wamesk/rating-field still maintained and safe for production?
The maintenance signal is effectively zero: zero stars, zero dependents, a single author, and a last release dated 2023-04-20. Treat the release you pin as the release you run forever, because no fixes are coming. The recommended mitigation is to vendor the source into app/Nova/Fields/Vendor/Rating, keep the copyright header and a NOTICE line, drop the Composer dependency, and assign a named owner.
Why does my Nova rating field show a plain number input or no stars at all?
That is the package's characteristic failure mode: when the compiled asset bundle is stale or missing, nothing throws. The form silently falls back to a number input or renders nothing, and the submission still succeeds, so users will not report it. The fix is process, not code: add a smoke test of the widget on one resource to your release checklist.
Can I show stars in Nova index and detail views, or is it forms only?
Treat it as a form input first. If you need star display in the index or detail views, sortable ratings, averages, or per-user vote history, this package is out of scope and you are really building a domain model. Confirm your actual requirement before adopting it, because those features are not part of this field.
Is the star widget accessible and keyboard friendly?
Accessibility is unverified here, and star widgets are routinely keyboard- and screen-reader-hostile. Check whether the component renders a focusable control with an ARIA value, or just click-handled i tags with no keyboard path. If it fails, wrap or replace the component before shipping it to staff.
Should I use wamesk/rating-field or build my own Nova field?
On Nova 4, with a simple input requirement, vendoring it is a clean low-effort fit; on Nova 5, build your own with php artisan nova:field instead of porting. Alternatives are an in-house field or a maintained community package, which avoids the silent degradation risk entirely. If you vendor it, confirm the license, almost certainly MIT, and copy the source in with attribution.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource