PHPackages                             se468/laravel-ratings - 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. se468/laravel-ratings

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

se468/laravel-ratings
=====================

Laravel Ratings Engine

v0.0.1(8y ago)113MITPHPPHP &gt;=5.5.9

Since Apr 11Pushed 7y ago2 watchersCompare

[ Source](https://github.com/se468/laravel-ratings)[ Packagist](https://packagist.org/packages/se468/laravel-ratings)[ RSS](/packages/se468-laravel-ratings/feed)WikiDiscussions master Synced yesterday

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

Laravel Ratings Engine
======================

[](#laravel-ratings-engine)

[![Latest Stable Version](https://camo.githubusercontent.com/b3280a4bc64d5aee459c1abe3f702813c7c1ab51f146e66e082b9e02f78a80b4/68747470733a2f2f706f7365722e707567782e6f72672f73653436382f6c61726176656c2d726174696e67732f762f737461626c65)](https://packagist.org/packages/se468/laravel-ratings)[![Total Downloads](https://camo.githubusercontent.com/ea0367d15e1034fcbb36568389806a11c303e455b125037b58186548fa58812f/68747470733a2f2f706f7365722e707567782e6f72672f73653436382f6c61726176656c2d726174696e67732f646f776e6c6f616473)](https://packagist.org/packages/se468/laravel-ratings)[![License](https://camo.githubusercontent.com/9fdd98c7fdff35c169d0729138cf2c457345d0f468bcd12fb87dbd47c8218e42/68747470733a2f2f706f7365722e707567782e6f72672f73653436382f6c61726176656c2d726174696e67732f6c6963656e7365)](https://packagist.org/packages/se468/laravel-ratings)

Ratings engine for Laravel using polymorphic relationships.

**DEMO** : [here](http://package-demos.seyongcho.com/rating)

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

[](#installation)

1. `composer require se468/laravel-ratings`
2. `php artisan migrate` to migrate the tables
3. Add `CanReceiveRatings` trait to your model that receives Ratings (`App\User`, `App\Company`, `App\Project` .. whatever you need to receive ratings for) and implement `RatingReceivable` interface to the model.
4. Add `CanGiveRatings` trait to your model that needs to give Ratings (Usually `App\User`).

Example (CanGiveRatings):

```
