Laravel Cascade Soft Deletes

Laravel Cascade Soft Deletes

Cascading Deletes for Eloquent Models


Description

Cascading Deletes for Eloquent Models

When a parent record—such as a blog post—is removed, you may also want to delete all related comments to maintain data integrity.

Typically this is handled by the database using foreign key constraints with an ON DELETE CASCADE rule on the comments table. However, if you need to restore a deleted parent record later, you might use Laravel’s soft‑deleting feature.

Soft deletes disable the database’s automatic cascading delete behavior. This package restores that capability while still allowing the SoftDeletes trait to be used.


Creator

Michael Dyrynda
@michaeldyrynda

Related Projects

Laravel Artifact

Laravel Artifact

Media Management Package

Mirror

Mirror

Impersonation Package

LaravelPlus Updater

LaravelPlus Updater

Sync Laravel Projects

Laravel Credits

Laravel Credits

Credit Management System

Laravel Glider

Laravel Glider

Glide Image Manipulation in Blade Templates

Laravel Ownable

Laravel Ownable

Eloquent Ownership Relationships