Skip to content

Conversation

@mauricewijnia
Copy link
Member

This pull request introduces support for organizing attachments into named collections, making it easier to group and query related attachments. The changes add a new collection column to the attachables table, update the documentation to show how to use collections, and provide a convenient relationship method for querying attachments by collection.

Database migration and model enhancements:

  • Added a new migration file add_collection_to_attachables_table.php.stub to introduce a nullable collection column to the attachables table, enabling attachments to be grouped by collection.
  • Registered the new migration in LaravelAttachmentLibraryServiceProvider.php to ensure it runs with the package's migrations.
  • Added the attachmentCollection method to the HasAttachments trait, allowing easy querying of attachments belonging to a specific collection.

Documentation updates:

  • Updated usage documentation to show how to attach an attachment to a specific collection and how to retrieve attachments by collection using the new relationship method. [1] [2]

@mauricewijnia mauricewijnia requested a review from a team as a code owner October 16, 2025 12:27
Copy link
Member

@dnwjn dnwjn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GREAT improvement! 🚀

@dnwjn dnwjn added enhancement New feature or request major Part of the next major version labels Oct 16, 2025
@mauricewijnia mauricewijnia merged commit a90bbaf into main Oct 16, 2025
1 check passed
@mauricewijnia mauricewijnia deleted the feature/add-collections branch October 16, 2025 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request major Part of the next major version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants