PHPackages                             starfolksoftware/gauge - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. starfolksoftware/gauge

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

starfolksoftware/gauge
======================

Gauge is a simple Laravel package that makes your models reviewable

v2.0.4(1y ago)3404MITPHPPHP ^8.1

Since Oct 9Pushed 1y ago1 watchersCompare

[ Source](https://github.com/starfolksoftware/gauge)[ Packagist](https://packagist.org/packages/starfolksoftware/gauge)[ Docs](https://github.com/starfolksoftware/gauge)[ RSS](/packages/starfolksoftware-gauge/feed)WikiDiscussions v2.x Synced 1mo ago

READMEChangelog (8)Dependencies (11)Versions (10)Used By (0)

Laravel Gauge
=============

[](#laravel-gauge)

[![Latest Version on Packagist](https://camo.githubusercontent.com/5614aad4af69a3518105e621a6e999e1c8ac65f36961e3709077a5fb537e8f7c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73746172666f6c6b736f6674776172652f67617567652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/starfolksoftware/gauge)[![Total Downloads](https://camo.githubusercontent.com/68db5dcea4f2a656e232b35122a8034f3f7a24402b500299a0bbaf293a13421b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73746172666f6c6b736f6674776172652f67617567652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/starfolksoftware/gauge)

Add reviews and ratings capabilities to your Laravel applications.

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

[](#installation)

You can install the package via composer:

```
composer require starfolksoftware/gauge
```

To install the package, run the following command:

```
php artisan gauge:install
```

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

[](#configurations)

To disable migrations, add the following in the service provider:

```
Gauge::ignoreMigrations();
```

To use a different `Review` model:

```
Gauge::useReviewModel('App\\Models\\CoolReviewModel');
```

To specify the user model to be used with Gauge:

```
Gauge::useUserModel('App\\Models\\UserTestModel');
```

To specify the reviews table name,

```
Gauge::useReviewsTableName('reviews_table');
```

To turn on support for soft deletiong,

```
Gauge::supportsSoftDeletes();
```

To turn on support or single reviews, that is, each user can only review a model at most once:

```
Gauge::supportsSingleReviews();
```

To turn on support for teams

```
Gauge::supportsTeams();
```

Usage
-----

[](#usage)

To make a model reviewable, add the `Reviewable` trait as in the following:

```
use StarfolkSoftware\Gauge\Reviewable;

class Item extends Model
{
    // ...
    use Reviewable;
    // ...
}
```

To create a review on a reviewable model,

```
$item->review($user, $rating, $comment);
```

To retrieve the reviews of a model,

```
$item->reviews;
```

To get the average rating for a model,

```
$item->averageRating();
```

To get the total number of reviews for a model,

```
$item->reviewCount();
```

To check if a model has been reviewed by a specific user,

```
$item->hasReviewByUser($user);
```

To get all reviews for a model by a specific user,

```
$item->reviewsByUser($user);
```

To delete all reviews for a model,

```
$item->deleteAllReviews();
```

To get reviews with a specific rating,

```
$item->reviewsWithRating($rating);
```

To get the highest rating given to a model,

```
$item->highestRating();
```

To get the lowest rating given to a model,

```
$item->lowestRating();
```

To get the latest review for a model,

```
$item->latestReview();
```

To get the oldest review for a model,

```
$item->oldestReview();
```

To calculate the distribution of ratings,

```
$item->ratingDistribution();
```

To get all approved reviews for a model,

```
$item->approvedReviews();
```

To get the total number of approved reviews,

```
$item->approvedReviewCount();
```

To get the average rating for approved reviews,

```
$item->averageApprovedRating();
```

To approve a specific review by ID,

```
$item->approveReview($reviewId);
```

To approve all reviews for a model,

```
$item->approveAllReviews();
```

To get reviews awaiting approval,

```
$item->pendingReviews();
```

To get the total number of pending reviews,

```
$item->pendingReviewCount();
```

To check if a model has approved reviews,

```
$item->hasApprovedReviews();
```

To check if a model has pending reviews,

```
$item->hasPendingReviews();
```

To mark a review as unapproved,

```
$item->unapproveReview($reviewId);
```

To setup the team support, add the `TeamHasReviews` trait to the team model,

```
use StarfolkSoftware\Gauge\TeamHasReviews;

class Team extends Model
{
    use TeamHasReviews;

    protected $table = 'teams';
}
```

To create a review for a team,

```
$team->reviews()->save([
    //...
]);
```

To fetch reviews of a team,

```
$team->reviews;
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Faruk Nasir](https://github.com/frknasir)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance42

Moderate activity, may be stable

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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

Every ~93 days

Recently: every ~2 days

Total

10

Last Release

475d ago

Major Versions

v1.5.0 → v2.0.02025-01-25

### Community

Maintainers

![](https://www.gravatar.com/avatar/6f609ab7be5e5a0089c8a3a52861fc379fd2038adb1190e0524c5f46a900fcf0?d=identicon)[starfolksoftware](/maintainers/starfolksoftware)

---

Top Contributors

[![frknasir](https://avatars.githubusercontent.com/u/4984175?v=4)](https://github.com/frknasir "frknasir (33 commits)")

---

Tags

laravelgaugestarfolksoftware

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/starfolksoftware-gauge/health.svg)

```
[![Health](https://phpackages.com/badges/starfolksoftware-gauge/health.svg)](https://phpackages.com/packages/starfolksoftware-gauge)
```

###  Alternatives

[worksome/exchange

Check Exchange Rates for any currency in Laravel.

123544.7k](/packages/worksome-exchange)[ralphjsmit/livewire-urls

Get the previous and current url in Livewire.

82270.3k4](/packages/ralphjsmit-livewire-urls)[marcelweidum/filament-expiration-notice

Customize the livewire expiration notice

9169.0k4](/packages/marcelweidum-filament-expiration-notice)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[ziming/laravel-scrapingbee

A PHP Laravel Library for ScrapingBee

4310.6k](/packages/ziming-laravel-scrapingbee)

PHPackages © 2026

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