We were receiving the same error described in issue #448:
checkCooldownAndFlushAfterPersisting(): Argument # 2 ($relationship) must be of type string, array given, called in /var/www/html/vendor/genealabs/laravel-model-caching/src/Traits/ModelCaching.php on line 83
Prior to this patch, I confirmed Argument # 2 ($relationship) contained an array of record IDs. After this patch, I confirmed Argument # 2 ($relationship) contained a string with the relationship name. The Model cache appears to be updated as expected after attach() and detach() events.
I was unable to run the package's test suite. This package seems to require Laravel Nova? I do not have a Nova license. Running composer install within this package directory prompts for a Laravel Nova login.
This patch resolved an error we were receiving when using attach() or detach() on a Model relationship after upgrading to Laravel 10. This patch seems to fix a bug introduced by this commit: https://github.com/GeneaLabs/laravel-pivot-events/commit/862371f6f89be296cc026c9cf5b372dca4d7958b
Relevant package versions:
We were receiving the same error described in issue #448:
Prior to this patch, I confirmed Argument # 2 ($relationship) contained an array of record IDs. After this patch, I confirmed Argument # 2 ($relationship) contained a string with the relationship name. The Model cache appears to be updated as expected after attach() and detach() events.
I was unable to run the package's test suite. This package seems to require Laravel Nova? I do not have a Nova license. Running
composer install
within this package directory prompts for a Laravel Nova login.