Releases: michaeldyrynda/laravel-cascade-soft-deletes
Releases · michaeldyrynda/laravel-cascade-soft-deletes
Allow the trait to be inherited
If you happen to want all of your models to implement SoftDeletes, you can now also add the CascadeSoftDeletes to your base model and the functionality will be correctly inherited through your child models.
Handle missing relationship methods, string relationship definition
Code changes
- Update docblocks
- Check that the cascade relationship method exists and that it returns the appropriate type
- A
LogicExceptionis now thrown if the method does not exist, as well as if it does exist and does not implementIlluminate\Database\Eloquent\Relations\Relation
- A
- Move iterating over the
cascadeDeletesproperty to a getter method, to ensure the trait functions even without the property defined - Switch
collecttoarray_filter(minor speed improvement)
Tests
- Add expected message regular expressions for expected exceptions
- Ensure we can accept a string in the
cascadeDeletesproperty - Ensure we handle relationship methods that don’t exist without triggering a fatal error
- Extract attaching of comments to a private method
Initial release
1.0.0 is the first release of the cascade soft deletes package.