All Projects → Naoray → Laravel Reviewable

Naoray / Laravel Reviewable

Licence: mit
Adds a reviewable feature to your laravel app.

Projects that are alternatives of or similar to Laravel Reviewable

Laravel Review Rateable
Review & Rating System For Lavavel 5, 6 & 7
Stars: ✭ 72 (+26.32%)
Mutual labels:  review, laravel, rating
Laravel Likeable
Rate Eloquent models with Likes and Dislikes in Laravel. Development moved to Laravel Love package!
Stars: ✭ 95 (+66.67%)
Mutual labels:  laravel, package, rating
Laravel Caffeine
Keeping Your Laravel Forms Awake.
Stars: ✭ 723 (+1168.42%)
Mutual labels:  laravel, package
Laravel Love
Add Social Reactions to Laravel Eloquent Models. It lets people express how they feel about the content. Fully customizable Weighted Reaction System & Reaction Type System with Like, Dislike and any other custom emotion types. Do you react?
Stars: ✭ 822 (+1342.11%)
Mutual labels:  laravel, rating
Laravel Bootstrap Table List
Bootstrap table list generator for Laravel.
Stars: ✭ 16 (-71.93%)
Mutual labels:  laravel, package
Laravel Translatable
A Laravel package for multilingual models
Stars: ✭ 624 (+994.74%)
Mutual labels:  laravel, package
Sleepingowladmin
🦉 Administrative interface builder for Laravel (Laravel admin)
Stars: ✭ 671 (+1077.19%)
Mutual labels:  laravel, package
Aetherupload Laravel
A Laravel package to upload large files 上传大文件的Laravel扩展包
Stars: ✭ 835 (+1364.91%)
Mutual labels:  laravel, package
Laravel Cascade Soft Deletes
Cascading deletes for Eloquent models that implement soft deletes
Stars: ✭ 498 (+773.68%)
Mutual labels:  laravel, package
Laravel Mention
a laravel user mentioned package
Stars: ✭ 12 (-78.95%)
Mutual labels:  laravel, package
Laravel Aws Sns
Laravel package for the AWS SNS Events
Stars: ✭ 24 (-57.89%)
Mutual labels:  laravel, package
Laravel Tabler
Laravel Package for integrating Tabler template and this package is Laravel Mix friendly.
Stars: ✭ 20 (-64.91%)
Mutual labels:  laravel, package
Youtube
🔥 Laravel PHP Facade/Wrapper for the Youtube Data API
Stars: ✭ 610 (+970.18%)
Mutual labels:  laravel, package
Befriended
Eloquent Befriended brings social media-like features like following, blocking and filtering content based on following or blocked models.
Stars: ✭ 596 (+945.61%)
Mutual labels:  laravel, package
Artisan View
👀 Manage your views in Laravel projects through artisan
Stars: ✭ 708 (+1142.11%)
Mutual labels:  laravel, package
Laravel Ban
Laravel Ban simplify blocking and banning Eloquent models.
Stars: ✭ 572 (+903.51%)
Mutual labels:  laravel, package
Package Skeleton
📦 My base for PHP packages.
Stars: ✭ 6 (-89.47%)
Mutual labels:  laravel, package
Laravel Dropbox Driver
A storage extension for Dropbox.
Stars: ✭ 42 (-26.32%)
Mutual labels:  laravel, package
Laravel Acl
This package helps you to associate users with permissions and permission groups with laravel framework
Stars: ✭ 404 (+608.77%)
Mutual labels:  laravel, package
React Native Store Review
Rate on App/Play Store directly in your React Native app
Stars: ✭ 437 (+666.67%)
Mutual labels:  review, rating

laravel-reviewable

Software License Travis StyleCI Total Downloads

This package adds a reviewable feature to your app.

Install

Laravel Version 5.7+

composer require naoray/laravel-reviewable

Laravel Version 5.6+

composer require naoray/laravel-reviewable:1.1.*

Laravel Version 5.5

composer require naoray/laravel-reviewable:1.0.*

publish config: php artisan vendor:publish --provider="Naoray\LaravelReviewable\LaravelReviewableServiceProvider"

Usage

First, add the Naoray\LaravelReviewable\Traits\HasReviews trait to your model you want to add reviews to.

use Naoray\LaravelReviewable\Traits\HasReviews;

class Post extends Model
{
    use HasReviews;

    // ...
}

Now you can create a review by:

// from reviewable entity
Post::first()->createReview(5, 'Example review text', $author);

// author is assumed to be logged in and executing this operation
Post::first()->createReview(10);

// with helper
review($post, 5, 'Example Text', $author);

and receive review scores by:

// summarizes all scores
Post::first()->score;

// gives the average of all scores
Post::first()->avg_score;

Using your own Review-Model

If you just want to change the global configuration to use your own Review-Model, just create a new Model and reference it in the reviewable.models.review config.

If you do not want to change the global review Model you can take a look at this issue for an example configuration.

Testing

Run the tests with:

vendor/bin/phpunit

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security-related issues, please email [email protected] instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].