PHPackages                             multek/laravel-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. [Database &amp; ORM](/categories/database)
4. /
5. multek/laravel-review

ActiveLibrary[Database &amp; ORM](/categories/database)

multek/laravel-review
=====================

Polymorphic review and rating system for Laravel Eloquent models with caching, moderation, and events.

v1.0.0(3mo ago)02MITPHPPHP ^8.2

Since Apr 1Pushed 3mo agoCompare

[ Source](https://github.com/Multek-Company/laravel-review)[ Packagist](https://packagist.org/packages/multek/laravel-review)[ RSS](/packages/multek-laravel-review/feed)WikiDiscussions main Synced 4w ago

READMEChangelog (1)Dependencies (5)Versions (4)Used By (0)

Laravel Review
==============

[](#laravel-review)

Polymorphic review and rating system for Laravel Eloquent models with caching, moderation, and events.

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

[](#installation)

```
composer require multek/laravel-review
```

Publish and run migrations:

```
php artisan vendor:publish --tag=review-migrations
php artisan migrate
```

Optionally publish the config:

```
php artisan vendor:publish --tag=review-config
```

Usage
-----

[](#usage)

### Setup Models

[](#setup-models)

Add `HasReviews` to any model that can be reviewed:

```
use Multek\Review\Traits\HasReviews;

class Product extends Model
{
    use HasReviews;
}
```

Add `CanReview` to models that can author reviews:

```
use Multek\Review\Traits\CanReview;

class User extends Model
{
    use CanReview;
}
```

### Creating Reviews

[](#creating-reviews)

```
// Via the reviewable model
$product->addReview([
    'rating' => 5,
    'title' => 'Amazing!',
    'body' => 'Best product ever.',
], $user);

// Via the author model
$user->review($product, [
    'rating' => 4,
    'body' => 'Pretty good.',
]);
```

### Review Summary (Cached)

[](#review-summary-cached)

```
$summary = $product->review_summary;

$summary->average_rating;       // 4.5
$summary->total_count;          // 42
$summary->rating_distribution;  // [1 => 2, 2 => 3, 3 => 5, 4 => 12, 5 => 20]
$summary->percentage(5);        // 47.6
```

### Moderation

[](#moderation)

```
$review->approve();
$review->reject();
$review->addReply('Thank you for your feedback!');

$review->isApproved();
$review->isPending();
$review->isRejected();
```

### Query Scopes

[](#query-scopes)

```
// On Review model
Review::approved()->get();
Review::pending()->get();
Review::byAuthor($user)->get();

// On reviewable models
Product::orderByAverageRating('desc')->get();
Product::orderByReviewCount('desc')->get();
Product::hasMinimumRating(4)->get();
Product::hasMinimumReviews(10)->get();
Product::withReviewSummary()->get();
```

### Events

[](#events)

- `ReviewCreated` — fired when a review is created
- `ReviewUpdated` — fired when a review is updated
- `ReviewApproved` — fired when status changes to approved
- `ReviewRejected` — fired when status changes to rejected
- `ReviewDeleted` — fired when a review is deleted

Configuration
-------------

[](#configuration)

```
return [
    'min_rating' => 1,
    'max_rating' => 5,
    'allow_decimals' => false,
    'auto_approve' => true,
    'cache' => [
        'enabled' => true,
        'ttl' => 3600,
        'store' => null,
        'prefix' => 'review_',
    ],
    'review_model' => \Multek\Review\Models\Review::class,
];
```

License
-------

[](#license)

MIT

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance82

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

90d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8976719?v=4)[rodrigocoliveira](/maintainers/rodrigocoliveira)[@rodrigocoliveira](https://github.com/rodrigocoliveira)

---

Top Contributors

[![rodrigocoliveira](https://avatars.githubusercontent.com/u/8976719?v=4)](https://github.com/rodrigocoliveira "rodrigocoliveira (2 commits)")

---

Tags

laraveleloquentreviewRatingpolymorphic

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

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

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

###  Alternatives

[illuminate/database

The Illuminate Database package.

2.8k54.1M11.3k](/packages/illuminate-database)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M337](/packages/psalm-plugin-laravel)[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k95.4M284](/packages/laravel-horizon)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M169](/packages/laravel-ai)[watson/validating

Eloquent model validating trait.

9803.5M53](/packages/watson-validating)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77022.3M131](/packages/laravel-mcp)

PHPackages © 2026

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