Skip to content

feat: add optional review image attachments - #70

Merged
codebyray merged 1 commit into
2.xfrom
feature/review-images-2.2
Sep 1, 2026
Merged

codebyray merged 1 commit into
2.xfrom
feature/review-images-2.2

Conversation

@codebyray

Copy link
Copy Markdown
Owner

Summary

Adds optional image attachments to reviews for the upcoming v2.2.0 release.

Review images are intentionally opt-in. The new review_images table is only created when its dedicated migration is published and run, so existing applications that do not need images remain unchanged.

What changed

  • Add multiple ordered images per review.
  • Add the images() relationship.
  • Add addImage() and addImages() methods.
  • Add image removal and reordering methods.
  • Add configurable storage disk and directories.
  • Add configurable image count, file size, and MIME-type limits.
  • Add original-image and thumbnail URL helpers.
  • Fall back to the original image when no thumbnail is supplied.
  • Add transaction-aware file cleanup.
  • Clean up partial files and database records when batch uploads fail.
  • Add eager-loading support.
  • Add a separately published review-images-migrations tag.
  • Add documentation for an application-owned thumbnail gallery and modal.
  • Extend the Laravel 10–13 CI matrix for the new filesystem dependencies.

Optional installation

Applications can enable review images with:

php artisan vendor:publish \
  --provider="Codebyray\ReviewRateable\ReviewRateableServiceProvider" \
  --tag=review-images-migrations

php artisan migrate

@codebyray
codebyray merged commit 752e73a into 2.x Sep 1, 2026
8 checks passed
@codebyray
codebyray deleted the feature/review-images-2.2 branch September 1, 2026 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant