Download the PHP package nelkasovic/laravel-rating without Composer
On this page you can find all versions of the php package nelkasovic/laravel-rating. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nelkasovic/laravel-rating
More information about nelkasovic/laravel-rating
Files in nelkasovic/laravel-rating
Package laravel-rating
Short Description manage rating column for elqouent models
License MIT
Homepage https://github.com/nelkasovic/laravel-rating
Informations about the package laravel-rating
New Maintainer
This package now maintined by Ahmed Nagi
Laravel-Ratings
Laravel package that allows you to rate, like & dislike or vote up & down your models with a simple and clear way.
If you see this packge can help, Don't skimp on me with a star :)
Rating
include CanRate
trait into your user model to apply rating functions
include Rateable
trait to your model that will be rateable
now you can rate your models as the following:
also you can unrate your models as the following:
get the average ratings of a model
get the total count of ratings of a model
get the rated models by a user
Voting
include CanVote
trait into your user model to apply rating functionalties
include Votable
trait to your model that will be votable
now you can vote your model as the following:
get total votes count
get total up votes count
get total down votes count
get the up voted models by a user
get the down voted models by a user
get the total voted models by a user
Like & Dislike
include CanLike
trait into your user model to apply like and dislike functionalties
include Likeable
trait to your model that will be likeable
now you can like your model as the following:
get total likes count
get total dislikes count
get total likes and dislikes count
get the liked models by a user
get the disliked models by a user
get the total liked and disliked models by a user
Install
for laravel 8. , 7. , 6.*
for laravel 5.*
in your config/app.php
You don't need this step in laravel5.5
package:discover
will do the job :)
publish the migrations
run the migrations