All notable changes to this project will be documented in this file.
- Laravel 9, 10, 11 & 12 support
CanRatetrait for author models (rate,rateUnique,hasRated,getRating,averageGivenRating,totalGivenRatings)- Scoped ratings via
typecolumn (rate different aspects separately) - Review body support via
bodycolumn - Weighted ratings via
weightcolumn andweightedAvgRating() - Configurable validation with
min/maxbounds andallow_negativeoption - Events:
RatingCreated,RatingUpdated,RatingDeleted - Query scopes:
withAvgRating,withSumRating,withCountRatings,orderByAvgRating,orderBySumRating,orderByCountRatings,minAvgRating,minSumRating isRatedBy()andcountRatings()helpersInvalidRatingExceptionfor validation errors- Publishable config file (
config/rating.php) - Laravel auto-discovery support
- Test suite (48 tests, 82 assertions)
- GitHub Actions CI
- Minimum PHP version is now 8.0
- Migration uses anonymous class and
$table->id()instead ofincrements() createUniqueRating()now returns a Rating model instead of an arraycountNegative()now returns an integer instead of a negated string- All methods now have proper type hints and return types
- Migration publishing uses
publishesMigrations()instead of custom artisan command findOrFail()used instead offind()for safer lookups
rating:migrationartisan command (replaced byvendor:publish)- PHP 7.4 support
- Laravel 5, 6, 7 support
- Unused
$parentparameter from trait methods
Legacy versions supporting Laravel 5-8 and PHP 7.4+.