PHPackages                             mistery23/eloquent-flusher - 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. mistery23/eloquent-flusher

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

mistery23/eloquent-flusher
==========================

laravel flush relations

v2.0.0(6y ago)01611MITPHPPHP ^7.2

Since Dec 4Pushed 6y ago1 watchersCompare

[ Source](https://github.com/mistery23/eloquent-flusher)[ Packagist](https://packagist.org/packages/mistery23/eloquent-flusher)[ Docs](https://github.com/mistery23/eloquent-flusher)[ RSS](/packages/mistery23-eloquent-flusher/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (1)Versions (6)Used By (1)

Eloquent flusher
================

[](#eloquent-flusher)

### Deffer push entity

[](#deffer-push-entity)

Install
-------

[](#install)

```
composer require mistery23/eloquent-flusher

```

Using
-----

[](#using)

```
use Mistery23\Flusher;

class Role extends Model
{
    use Flusher;
    ....

    /**
     * For BelongsToMany.
     * Detach permission from a role.
     *
     * @param string $permissionId
     */
    public function detachPermission($permissionId): void
    {
        $this->detachItem('permissions', $permissionId);
    }

    .....

    /**
     * For HasMany.
     * Detach role translations from a role.
     *
     * @param string $locale
     *
     * @return void
     */
    public function detachTranslation(string $locale): void
    {
        $translation = $this->translations->where('locale', $locale)->first();

        $this->detachItem('translations', $translation);
    }
}

```

### And flush in repository

[](#and-flush-in-repository)

---

```
    /**
     * Update role
     *
     * @param Role $role
     *
     * @return void
     *
     * @throws \RuntimeException
     */
    public function update(Role $role): void
    {
        if (false === $role->flush()) {
            throw new \RuntimeException('Update error.');
        }
    }

```

---

License
-------

[](#license)

This package is free software distributed under the terms of the [MIT license](https://opensource.org/licenses/MIT). Enjoy!

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~3 days

Total

5

Last Release

2337d ago

Major Versions

1.1.2 → v2.0.02019-12-18

### Community

Maintainers

![](https://www.gravatar.com/avatar/86dc8a5e2e48c6a2223042e929b4d306ce437495a3c4aaf0e2e945355eda7789?d=identicon)[mistery23](/maintainers/mistery23)

---

Top Contributors

[![alexandrbarabolia](https://avatars.githubusercontent.com/u/17147023?v=4)](https://github.com/alexandrbarabolia "alexandrbarabolia (11 commits)")

---

Tags

laravelmodeleloquentrelationsflushrelations removerelations deleterelations push with delete

### Embed Badge

![Health badge](/badges/mistery23-eloquent-flusher/health.svg)

```
[![Health](https://phpackages.com/badges/mistery23-eloquent-flusher/health.svg)](https://phpackages.com/packages/mistery23-eloquent-flusher)
```

###  Alternatives

[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k7.2M71](/packages/mongodb-laravel-mongodb)[tucker-eric/eloquentfilter

An Eloquent way to filter Eloquent Models

1.8k4.8M26](/packages/tucker-eric-eloquentfilter)[dyrynda/laravel-model-uuid

This package allows you to easily work with UUIDs in your Laravel models.

4802.8M8](/packages/dyrynda-laravel-model-uuid)[spiritix/lada-cache

A Redis based, automated and scalable database caching layer for Laravel

591444.8k2](/packages/spiritix-lada-cache)[pdphilip/elasticsearch

An Elasticsearch implementation of Laravel's Eloquent ORM

145360.2k4](/packages/pdphilip-elasticsearch)[sebastiaanluca/laravel-boolean-dates

Automatically convert Eloquent model boolean attributes to dates (and back).

40111.7k1](/packages/sebastiaanluca-laravel-boolean-dates)

PHPackages © 2026

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