PHPackages                             nicxonsolutions/laravel-rateable - 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. nicxonsolutions/laravel-rateable

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

nicxonsolutions/laravel-rateable
================================

Allows multiple models to be rated with a fivestar like system.

1.0.0(3w ago)01↓100%MITPHPPHP ^8.1 || ^8.2 || ^8.3 || ^8.4

Since May 13Pushed 3w agoCompare

[ Source](https://github.com/robertnicjoo/laravel-rateable)[ Packagist](https://packagist.org/packages/nicxonsolutions/laravel-rateable)[ Docs](https://github.com/robertnicjoo/laravel-rateable)[ Fund](https://nicxonsolutions.com)[ GitHub Sponsors](https://github.com/robertnicjoo)[ RSS](/packages/nicxonsolutions-laravel-rateable/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (4)Versions (2)Used By (0)

Laravel Rateable
================

[](#laravel-rateable)

[![Latest Stable Version](https://camo.githubusercontent.com/15548d4a0e9886cfd004e466be6090ba023e8279ad3c6ad8de77d3d60bb199a7/68747470733a2f2f706f7365722e707567782e6f72672f6e6963786f6e736f6c7574696f6e732f6c61726176656c2d7261746561626c652f762f737461626c652e737667)](https://packagist.org/packages/nicxonsolutions/laravel-rateable) [![License](https://camo.githubusercontent.com/c033bf160c035dc6fa40384f9d326c9e8403a97684ea0180733db2c83ff55fba/68747470733a2f2f706f7365722e707567782e6f72672f6e6963786f6e736f6c7574696f6e732f6c61726176656c2d7261746561626c652f6c6963656e73652e737667)](https://packagist.org/packages/nicxonsolutions/laravel-rateable)

[![Total Downloads](https://camo.githubusercontent.com/af6aedd38765dc9c20b20e3c56f7c0925334ecffb13f899aabd8b582576e35cc/68747470733a2f2f706f7365722e707567782e6f72672f6e6963786f6e736f6c7574696f6e732f6c61726176656c2d7261746561626c652f646f776e6c6f6164732e737667)](https://packagist.org/packages/nicxonsolutions/laravel-rateable) [![Monthly Downloads](https://camo.githubusercontent.com/35bdde166de4dfb7f6988006797fe93bedb1c9ae15be48c78293907bc8521f1b/68747470733a2f2f706f7365722e707567782e6f72672f6e6963786f6e736f6c7574696f6e732f6c61726176656c2d7261746561626c652f642f6d6f6e74686c792e706e67)](https://packagist.org/packages/nicxonsolutions/laravel-rateable) [![Daily Downloads](https://camo.githubusercontent.com/ec9bba4c706e06c1bac13b519c598ea2aff0e39a78fdb06aa31d63d4379807c8/68747470733a2f2f706f7365722e707567782e6f72672f6e6963786f6e736f6c7574696f6e732f6c61726176656c2d7261746561626c652f642f6461696c792e706e67)](https://packagist.org/packages/nicxonsolutions/laravel-rateable)

Provides a trait to allow rating of any Eloquent models within your app for Laravel versions 8 and higher.

Ratings could be fivestar style, or simple +1/-1 style.

Compatability
-------------

[](#compatability)

Laravel versions &gt;= 8.x are supported, including Laravel 13.

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

[](#installation)

You can install the package via composer:

```
composer require nicxonsolutions/laravel-rateable
```

You can publish and run the migrations with:

```
php artisan vendor:publish --provider="nicxonsolutions\Rateable\RateableServiceProvider" --tag="migrations"
php artisan migrate
```

The package will be auto-discovered by Laravel.

Usage
-----

[](#usage)

In order to mark a model as "rateable", import the `Rateable` trait.

```
