Looking to hire Laravel developers? Try LaraJobs

laravel-ratings-and-reviews maintained by wildwestriverrider

Description
Ratings and reviews for Laravel 10+
Author
Last update
2026/04/03 13:36 (dev-main)
License
Downloads
610

Comments
comments powered by Disqus

Ratings and reviews for Laravel 10+

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This package allows you to add ratings and reviews to any model in your Laravel application.

Installation

You can install the package via composer:

composer require wildwestriverrider/laravel-ratings-and-reviews

You can publish and run the migrations with:

php artisan vendor:publish --tag="ratings-and-reviews-migrations"
php artisan migrate

You can publish the config file with:

php artisan vendor:publish --tag="ratings-and-reviews-config"

This is the contents of the published config file:

return [
    'max-rating' => 5,
    'min-rating' => 1
];

Usage

Traits

HasRatings - add this to the user model that will be giving ratings

HasReviews - add this to the user model that will be giving reviews

Rateable - add this to any model that should be rateable

Reviewable - add this to any model that should be reviewable

$laravelRatingsAndReviews = new Wildwestriverrider\LaravelRatingsAndReviews();

Testing

composer test