Skip to content

Commit c9b7bd0

Browse files
authored
Merge pull request #5 from ymigval/fix-helper-methods-relationships
Fix BelongsToMany cache handling with custom implementation
2 parents 95a4da6 + 5851454 commit c9b7bd0

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

CHANGELOG.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,11 @@
22

33
All notable changes to `laravel-model-cache` will be documented in this file.
44

5-
## [1.1.3] - 2025-05-30
6-
7-
### Fixed
8-
- Updated `CachingBelongsToMany` class to properly extend Laravel's BelongsToMany class and maintain the relationship contract. This resolves the "must return a relationship instance" error when accessing relationship properties after operations like attach() and detach().
9-
10-
## [1.1.2] - 2025-05-25
5+
## [1.1.2] - 2025-05-21
116

127
### Fixed
138
- Fixed implementation of the `ModelRelationships` trait to properly handle BelongsToMany operations. Replaced the event-based approach (which was relying on non-existent Laravel events) with a custom BelongsToMany relationship class that flushes the cache after attach, detach, sync, syncWithoutDetaching, and updateExistingPivot operations.
9+
- Updated `CachingBelongsToMany` class to properly extend Laravel's BelongsToMany class and maintain the relationship contract. This resolves the "must return a relationship instance" error when accessing relationship properties after operations like attach() and detach().
1410

1511
## [1.1.1] - 2025-05-19
1612

0 commit comments

Comments
 (0)