Laravel Cascade Soft Deletes Versions Save

Cascading deletes for Eloquent models that implement soft deletes

1.4.0

6 years ago

Add Laravel 5.6 support

1.3.0

6 years ago

Add Laravel 5.5 support

1.2.1

6 years ago

Remove composer.lock file from package repository

1.2.0

7 years ago

Add Laravel 5.4 compatibility

1.1.0

7 years ago

Add Laravel 5.3 compatibility

1.0.5

7 years ago

Provides better support for hasOne relationships, and relationship methods that return null.

1.0.4

7 years ago

Thanks to @schnittstabil, adds support for cascading deletes of model grandchildren per #8, #9.

1.0.3

7 years ago

Per #7, when using forceDelete in combination with foreign key constraints, the forceDelete would fail ont he parent record due to child records still existing as the cascade would only ever use delete, updating the child records' deleted_at column leaving them in place.

1.0.2

8 years ago

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.

1.0.1

8 years ago

Code changes

  • Update docblocks
  • Check that the cascade relationship method exists and that it returns the appropriate type
    • A LogicException is now thrown if the method does not exist, as well as if it does exist and does not implement Illuminate\Database\Eloquent\Relations\Relation
  • Move iterating over the cascadeDeletes property to a getter method, to ensure the trait functions even without the property defined
  • Switch collect to array_filter (minor speed improvement)

Tests

  • Add expected message regular expressions for expected exceptions
  • Ensure we can accept a string in the cascadeDeletes property
  • Ensure we handle relationship methods that don’t exist without triggering a fatal error
  • Extract attaching of comments to a private method