Allow sync method for Laravel Has Many Relationship.
MIT License
Bot releases are hidden (Show)
Breaking changes
If an ID in the related data does not exist or is not in the scope of the hasMany
relation, the sync
function will throw a ModelNotFoundException
. It is possible to modify this behavior with the $throwOnIdNotInScope
attribute. Per default, this is set to true
. If set to false, the sync
function will ignore the Ids instead of throwing an exception.
Before the release, the sync
function would update the model even if the ID does not belong to the original model and throw a runtime exception if the ID does not exist at all.
Changelog
Credits
Thanks to @bianchi for helping out with this release!
Published by korridor over 1 year ago
Breaking changes
Alfa6661\EloquentHasManySync
to Korridor\LaravelHasManySync
.Changes
Published by korridor over 2 years ago
Published by korridor over 3 years ago
Published by korridor over 3 years ago