westaddy / reviews
This package is meant to create a nice review
dev-master
2016-08-26 13:34 UTC
This package is not auto-updated.
Last update: 2026-03-26 09:21:51 UTC
README
Installation
Get the package through Composer.
Open composer and require the following:
"require": {
"westaddy/reviews":"dev-master",
},
And then include the service provider within app/config/app.php.
'providers' => [
Westaddy\Reviews\AzzonReviewServiceProvider::class
];
At last you need to publish and run the migration.
php artisan vendor:publish --provider=Westaddy\Reviews\AzzonReviewServiceProvider && php artisan migrate
Setup a Model
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Post extends Model implements Rating
{
use \Westaddy\Reviews\Review;
}
Create a rating
Post::createReview($post_id,$comment,$rating,$ip,$user_id);
Get all ratingd
Post::getReviews($post_id);