Skip to content

Conversation

@Samuell1
Copy link
Member

This pull request makes a small update to the defineSortableRelations method in src/Database/Traits/SortableRelation.php to improve support for relation types. The change adds morphToMany to the list of relation types that interact with pivot tables.

  • Added morphToMany to the $interactsWithPivot array to ensure sortable relations work correctly for both belongsToMany and morphToMany relationships.

Copilot AI review requested due to automatic review settings August 20, 2025 21:00
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR extends the sortable relations functionality to support polymorphic many-to-many relationships by adding morphToMany to the list of relation types that interact with pivot tables.

  • Added morphToMany to the $interactsWithPivot array alongside belongsToMany

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@daftspunk daftspunk merged commit abeaa5c into octobercms:4.x Aug 23, 2025
3 checks passed
@daftspunk
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants