PHPackages                             gpablore/laravel-user-review - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. gpablore/laravel-user-review

ActiveLaravel-package

gpablore/laravel-user-review
============================

A Laravel Package for User Review on Models, like Product review for ecommerce systems.

1.3(6y ago)016MITPHPPHP ^7.2

Since Mar 25Pushed 5y agoCompare

[ Source](https://github.com/gpablore/laravel-user-review)[ Packagist](https://packagist.org/packages/gpablore/laravel-user-review)[ RSS](/packages/gpablore-laravel-user-review/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (9)Used By (0)

Review-Ratings: Laravel Package
===============================

[](#review-ratings-laravel-package)

[![Latest Stable Version](https://camo.githubusercontent.com/6c00a3fe0bd6c0a0a733f3904ed4302720535660c1afa2151c2fbec232718231/68747470733a2f2f706f7365722e707567782e6f72672f64677661692f6c61726176656c2d757365722d7265766965772f762f737461626c65)](https://packagist.org/packages/dgvai/laravel-user-review)[![Total Downloads](https://camo.githubusercontent.com/136f194d08b6443e13e2098de4186f59938f3df137e7d3a54dd6d97785de8208/68747470733a2f2f706f7365722e707567782e6f72672f64677661692f6c61726176656c2d757365722d7265766965772f646f776e6c6f616473)](https://packagist.org/packages/dgvai/laravel-user-review)[![Latest Unstable Version](https://camo.githubusercontent.com/221c7e69181805712e3e25659689238d89aa0cb6c56784699562cd45c0ab2bfe/68747470733a2f2f706f7365722e707567782e6f72672f64677661692f6c61726176656c2d757365722d7265766965772f762f756e737461626c65)](https://packagist.org/packages/dgvai/laravel-user-review)[![License](https://camo.githubusercontent.com/70b444fd586d87c7c3c8e711c483c757f9f9f7c9e3fc79062e2dd762c02e2bf6/68747470733a2f2f706f7365722e707567782e6f72672f64677661692f6c61726176656c2d757365722d7265766965772f6c6963656e7365)](https://packagist.org/packages/dgvai/laravel-user-review)

This package uses a trait for a model which can be reviewable by users and give starred/point ratings and only one reply can come from admin as a support response. (like Google playstore review system). This package can be used with any projects like Ecommerce, Shop, Store, etc models.

> Author: **Jalal Uddin** [Github](https://github.com/dgvai-git) | [Linked-in](https://linkedin.com/in/dgvai) | [Facebook](https://facebook.com/dgvai.hridoy)

Requirements
------------

[](#requirements)

- PHP &gt;= 7.1
- Laravel &gt;= 5.6

Installation
------------

[](#installation)

> using COMPOSER

` composer require dgvai/laravel-user-review`

Configurations
--------------

[](#configurations)

> Export the assets (migration and config)

`php artisan vendor:publish --provider="DGvai\Review\ReviewerServiceProvider" `

> Run the migration

`php artisan migrate`

> Clear configuration cache

`php artisan config:cache`

Usage
-----

[](#usage)

Add `Reviewable` trait to the model where you want users to give review and ratings. As example for **Product Model**

```

```

### Creating review for a product:

[](#creating-review-for-a-product)

> Description

`makeReview(object $user, int $rating [, string $review])`

> Returns

`Object instance of the review`

> Example

```
    $product = Product::find($id);
    $user = auth()->user();

    $product->makeReview($user,3,'Very good product!');
```

### Review attributes

[](#review-attributes)

```
    // Get all active reviews of the product
    $product->reviews();

    // Get neumetic review count (average)
    $product->rating;

    // Get percentage review count (average)
    $product->rating_percent;

    /**
    *   NOTE: THIS PERCENTAGE IS BASED ON 5 STAR RATING, IF YOU WANT CUSTOM STAR, USE BELLOW
    *   This is configured via the config file comes with this package: user-review.php
    *   You can also set environment variable for your systems default star count
    *
    *   (.env)  SYSTEM_RATING_STAR_COUNT=5
    */

    $product->averageRating(10);    //percentage for 10 starrted model

    // Get rating given to the product by a user:
    $product->userRating($user);

    /**
     *  Get Filtered Review
     *  Like, get only reviews that has been given 4 stars!
     *
    */

    $product->filter(4);

    /**
     * Get it's percentage, which can be shown in the progress bar!
     * */
    $product->filteredPercentage(4);      // ex: output: 75

    /**
     *  PULLING OUT REVIEWS
     *  There are several ways you can
     *  pull out reviews of products
    */

    // Get all reviews of all products
    $reviews = DGvai\Review\Review::all();              // all reviews
    $reviews = DGvai\Review\Review::active()->get();    // all active reviews
    $reviews = DGvai\Review\Review::inactive()->get();  // all inactive reviews
    $reviews = DGvai\Review\Review::daily()->get();     // all daily reviews
    $reviews = DGvai\Review\Review::monthly()->get();   // all monthly reviews
    $reviews = DGvai\Review\Review::yearly()->get();    // all yearly reviews

    // You can also chain these methods
    $reviews = DGvai\Review\Review::monthly()->active()->get();  // get aa monthly active reviews

    // Get reviews of a product
    $product->reviews();

    /**
     *  $reviews has some attributes
     *  Let's assume we are taking the first review
    */
    $review = $reviews->first();

    /**
     *  This the model object of the traited model
     *  In our case it is product
     *
    */

    $review->model;     //  so $review->model->name with return the $product->name
    $review->user;      //  return User model that reviewed the model

    // Get review text
    $review->review_text;

    // Get review reply
    $review->reply;

    // reply a review by admin:
    $review->reply('Thanks for being with us!');

    // making active/inactive
    $review->makeActive();
    $review->makeInactive();
```

> Till now that's it! Updates will bring new features soon InshaAllah.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 71.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~4 days

Total

8

Last Release

2209d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1716585?v=4)[Gp SIdhu](/maintainers/gpsidhuu)[@gpsidhuu](https://github.com/gpsidhuu)

---

Top Contributors

[![gpablore](https://avatars.githubusercontent.com/u/76036603?v=4)](https://github.com/gpablore "gpablore (5 commits)")[![dgvai](https://avatars.githubusercontent.com/u/53512998?v=4)](https://github.com/dgvai "dgvai (2 commits)")

### Embed Badge

![Health badge](/badges/gpablore-laravel-user-review/health.svg)

```
[![Health](https://phpackages.com/badges/gpablore-laravel-user-review/health.svg)](https://phpackages.com/packages/gpablore-laravel-user-review)
```

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11320.2M21](/packages/anourvalar-eloquent-serialize)[namu/wirechat

A Laravel Livewire messaging app for teams with private chats and group conversations.

54324.5k](/packages/namu-wirechat)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135192.6k5](/packages/statamic-rad-pack-runway)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
