Download the PHP package daniyal-javani/laravel-rating without Composer
On this page you can find all versions of the php package daniyal-javani/laravel-rating. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download daniyal-javani/laravel-rating
More information about daniyal-javani/laravel-rating
Files in daniyal-javani/laravel-rating
Package laravel-rating
Short Description manage rating column for elqouent models
License MIT
Informations about the package laravel-rating
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 functionalties
include Rateable
trait to your model that will be rateable
now you can rate 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 7.*
for laravel 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