PHPackages                             cleisonfreitas/association-remover - 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. cleisonfreitas/association-remover

ActiveLibrary

cleisonfreitas/association-remover
==================================

Esse pacote possibilita ao usuário realizar a exclusão de um registro em modelo cascata.

00PHP

Since Aug 23Pushed 1y ago1 watchersCompare

[ Source](https://github.com/CleisonFreitas/association-remover)[ Packagist](https://packagist.org/packages/cleisonfreitas/association-remover)[ RSS](/packages/cleisonfreitas-association-remover/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Association Remover
===================

[](#association-remover)

How to apply
------------

[](#how-to-apply)

- Install the package

```
composer require cleisonfreitas/association-remover

```

How to use
----------

[](#how-to-use)

- After installing, just call GerenciarRelacaoTrait in your model and define which relations will be deleted after removing the record

### Example:

[](#example)

```
class YourClassModel extends Model
{
    use SoftDeletes, HasFactory, GerenciarRelacaoTrait;

    protected array $relacionamentos = [
        'relationOne',
        'relationTow',
    ];

    ...
}
```

All the relations listed will be removed in case of this record been deleted.

Important
---------

[](#important)

If you define that some relation will be removed with GerenciarRelacaoTrait you have to apply the same feature to model/relation you mentioned.

Example:
--------

[](#example-1)

```
class FirstModel extends Model
{
    use SoftDeletes, HasFactory, GerenciarRelacaoTrait;

    protected array $relacionamentos = [
        'seconModelRelation',
    ];

    ...
}

class SecondModel extends Model
{
    use SoftDeletes, HasFactory, GerenciarRelacaoTrait;

    protected array $relacionamentos = [];

    ...
}
```

- The relacionamentos attribute can be empty

To more information, send me an email:

###  Health Score

13

—

LowBetter than 1% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity17

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/e21ba0d0189c5c60f474ad060eb553a3f0e5794da0315cf43a51121f69fcf7d2?d=identicon)[CleisonFreitas](/maintainers/CleisonFreitas)

---

Top Contributors

[![CleisonFreitas](https://avatars.githubusercontent.com/u/54112790?v=4)](https://github.com/CleisonFreitas "CleisonFreitas (6 commits)")

### Embed Badge

![Health badge](/badges/cleisonfreitas-association-remover/health.svg)

```
[![Health](https://phpackages.com/badges/cleisonfreitas-association-remover/health.svg)](https://phpackages.com/packages/cleisonfreitas-association-remover)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
