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
Laravel Rating

Laravel Rating Laravel Package

nagy/laravel-rating

Add ratings to any Eloquent model in Laravel with a simple trait and API. Let users rate items, then retrieve average, sum, and individual ratings. Useful for likes, scores, reviews, or star-style feedback, with flexible rating values and relationships.

View on GitHub
Deep Wiki
Context7

nagy/laravel-rating is a flexible rating package for Laravel that lets users rate any Eloquent model through simple Rateable and Rater traits. It supports multiple independent rating types (e.g. quality, price, service) and stores scores with optional reviews, making it easy to build star ratings, product feedback, or user reputation systems.

  • Rate any Eloquent model with reusable traits
  • Support multiple rating categories per model
  • Attach optional comments or reviews to ratings
  • Query average scores and rating counts
  • Configurable models, tables, and validation
Frequently asked questions about Laravel Rating
What does nagy/laravel-rating do?
It is a Laravel package that adds rating, like/dislike, and +1/-1 voting behavior to Eloquent models through a trait and a simple API. It supports multiple rating types and average scores, so you can attach scoring to users, posts, products, and similar models. It is a thin layer over Eloquent conventions rather than a full review or moderation platform.
How do I install nagy/laravel-rating?
Install it with composer require nagy/laravel-rating, then add the package trait to the model you want to rate. You typically add a rating column through a migration and call the exposed API to record or read scores. Because the last release is from 2021, check composer why-not against your Laravel and PHP versions before assuming it installs cleanly.
Does nagy/laravel-rating support Laravel 10 or Laravel 11?
Likely not out of the box. The last release was in 2021 and most likely pins illuminate/support to Laravel 8.x, so installation against Laravel 10, 11, or PHP 8.2+ may fail or be untested. Confirm the constraint with composer why-not and plan a fork or internal vendoring if you need a current major.
How does nagy/laravel-rating store ratings?
The package is described as a thin Eloquent trait plus column convention that persists scores into a column. That suggests an aggregate or denormalized value supporting a running average, but it is unclear whether it also keeps per-rater rows, deduplication, or audit history. Verify the persistence model before relying on it for moderation or 'who rated what' requirements.
Is nagy/laravel-rating safe for concurrent rating writes?
Not confirmed. With a column-based aggregate, two simultaneous ratings can cause lost updates unless the package uses atomic increments or transactions with locks. Inspect the write path and test concurrent requests before using it in a high-traffic production feature. If it is not concurrency-safe, wrap writes in your own transactional service.
Can I rate multiple models and support polymorphic raters?
The package attaches to any Eloquent model and supports multiple rating types, so rating multiple entity types is within scope. Polymorphic raters and one-rating-per-user constraints are the critical unknown and may not be supported if the package only maintains an aggregate counter. Test a one-user-one-rating scenario explicitly, and extend the schema yourself if needed.
Does nagy/laravel-rating include migrations I can customize?
The integration path expects you to add the rating column via migration, and it is unclear whether the package ships publishable migrations. Check the repository for migration files and confirm they run cleanly alongside your existing schema and can be rolled back. If migrations are not publishable, define the column yourself with your own naming and indexing conventions.
What rating types and averages does nagy/laravel-rating provide?
It supports ratings, likes and dislikes, and +1/-1 votes, with multiple rating types and averages. That makes it suitable for simple star scores or up/down signals on products, posts, and users. Confirm how averages are computed and whether they are recalculated or maintained incrementally, since that affects consistency.
Is nagy/laravel-rating actively maintained?
No. The last release was over four years ago, it has zero dependents, and it is a niche single-maintainer project with about 216 stars, so expect no upstream fixes. Treat it as internally owned: budget for a fork or a scheduled replacement, and record the decision in an ADR. MIT licensing makes forking or vendoring the small codebase viable.
Should I use nagy/laravel-rating in production or build it myself?
Use it only after a short spike proves compatibility and that the persistence model meets your requirements. The architectural surface is small enough that an in-house implementation is a credible alternative, especially if you need per-rater rows, audit history, or concurrency guarantees. If you adopt it, wrap it behind an internal RatingService interface so the dependency is swappable.
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.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core
nodisrupt/laravel-agent
sierratecnologia/media-manager