PHPackages                             jrmadsen67/laravel-cascade-updates - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. jrmadsen67/laravel-cascade-updates

ActiveLibrary[Database &amp; ORM](/categories/database)

jrmadsen67/laravel-cascade-updates
==================================

Cascading model updates for Laravel.

1.0(7y ago)2143MITPHP

Since Dec 28Pushed 7y ago2 watchersCompare

[ Source](https://github.com/jrmadsen67/laravel-cascade-updates)[ Packagist](https://packagist.org/packages/jrmadsen67/laravel-cascade-updates)[ RSS](/packages/jrmadsen67-laravel-cascade-updates/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (2)Used By (0)

Laravel Cascade Updates
=======================

[](#laravel-cascade-updates)

v1.0.0
------

[](#v100)

This is basically a fork of  by Michael Dyrynda. I had the idea to make this for sometime, and after planning out how I wanted it to work I searched around to see what was similar. Michael's library was already well established and worked very similarly to what I had in mind, so in the interest of getting it done quickly over the holidays and sticking to a known format, I just based mine on his work.

This Trait allows you to update all lower entities in a hierarchy when a top level record is changed. For example, if I have Authors with multiple Posts, and each Post has multiple Comments, I can set a `is_active` flag to false on an Author and have all of their Posts and the related Comments deactivate at the same time.

Code Samples
------------

[](#code-samples)

```
