laravel-reviewRateable icon indicating copy to clipboard operation
laravel-reviewRateable copied to clipboard

Simple Published Moderation

Open interludic opened this issue 7 years ago • 2 comments

Could you please add a status(string) column to the ratings table, we can fill it with pending, approved moderation

Open to alternative, would just like to filter out any spam or abuse before it gets published.

interludic avatar Aug 14 '17 23:08 interludic

You could add a column such as 'approved' and make it true or false. Have all ratings default to false and not show if approved is false. Would be a simple addition to make.

I have that in a version I forked off this main version. It does have a bunch of other options for my project. However, I can possibly put it together in this repo and put in a pull request when I have time.

codebyray avatar Oct 26 '18 05:10 codebyray

Actually... after publishing the migration file to your local project, you could add any additional column to your own migration file.

In order to update the rating with the new 'status' column. Just have to pass that additional column into the add or update method

$rating = $post->updateRating(1, [ 'title' => 'new title', 'body' => 'new body', 'rating' => 3, 'status' => 'active', <--- add this ]);

Trexology avatar Oct 26 '18 05:10 Trexology