2017 © Pedro Peláez
 

library user-ratings

Add user ratings to Laravel 5.1 Eloquent models.

image

craigzearfoss/user-ratings

Add user ratings to Laravel 5.1 Eloquent models.

  • Sunday, January 15, 2017
  • by craigzearfoss
  • Repository
  • 2 Watchers
  • 3 Stars
  • 77 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

User Ratings for Laravel 5

This package allows you to attach user ratings an Eloquent model in Laravel 5. The ratings include an integer field for a numeric rating; boolean fields for like, dislike and favorite and a text field for a comment., (*1)

Composer Install

It can be found on Packagist. The recommended way is through composer., (*2)

Edit composer.json and add:, (*3)

{
    "require": {
        "craigzearfoss/user-ratings": "dev-master"
    }
}

And install dependencies:, (*4)

$ composer update

If you do not have Composer installed, run these two commands:, (*5)

$ curl -sS https://getcomposer.org/installer | php
$ php composer.phar install

Install and then Run the migrations

Find the providers array key in config/app.php and register the User Ratings Service Provider., (*6)

'providers' => array(
    // ...

    Craigzearfoss\UserRatings\UserRatingsServiceProvider::class,
)

Run the migration to create the user_ratings table., (*7)

php artisan vendor:publish --provider="Craigzearfoss\UserRatings\Providers\UserRatingsServiceProvider"
php artisan migrate

Configuration

In your model add the UserRatableTrait., (*8)

<?php

// ...
use Craigzearfoss\UserRatings\UserRatableTrait;

class MyModel extends Model
{
    use UserRatableTrait;

Usage

@TODO, (*9)

Changelog

See the CHANGELOG file, (*10)

Support

Please open an issue on GitHub, (*11)

Contributor Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms., (*12)

License

UserRatings is released under the MIT License. See the bundled LICENSE file for details., (*13)

The Versions

15/01 2017

dev-master

9999999-dev

Add user ratings to Laravel 5.1 Eloquent models.

  Sources   Download

MIT License

The Requires

 

laravel php review craigzearfoss