Developer docs Core 2.2 · Pro 1.x

Search documentation

Search Core and Pro guides, including code examples.

PRO · COMMERCIAL

Official team replies.

Install the complete review experience, choose an interface, and configure customer and team workflows.

← All Pro topics

Replies

Official owner/team replies are optional, with one editable response per published review:

php artisan vendor:publish --tag=review-rateable-pro-replies-migrations
php artisan migrate
'replies' => [
    'enabled' => true,
    'ability' => 'replyToReview',
    'min_length' => 2,
    'max_length' => 5000,
],

Define replyToReview to receive the reviewable model and the core review. Reply permission is separate from moderation permission. This example assumes an owner_id field:

use Codebyray\ReviewRateable\Models\Review;

Gate::define('replyToReview', fn (User $user, Product $product, Review $review) =>
    $user->id === $product->owner_id
);

The moderation dashboard adds the editor when permitted. Or embed it on your own private owner/team page:

<livewire:review-rateable-pro-review-reply-form
    :reviewable="$product"
    :review-id="$review->id" />

For custom authorized workflows:

$reply = $manager->saveReply($review, 'Thank you for the feedback.');
$manager->removeReply($review);

$reviews = $product->reviews()
    ->where('approved', true)
    ->with(['ratings', 'proReply.author'])
    ->get();

Replies are plain text and HTML-escaped. A reply records its last authenticated editor and update date, not an arbitrary caller-supplied author. Hiding its review hides the reply; reapproval restores it. Removal is permanent, and this is not a threaded discussion feature.