PHPackages                             nhalstead/transferable - 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. nhalstead/transferable

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

nhalstead/transferable
======================

Transfer attached relationships from one model instance to another model instance of the same type.

1.0.3(4y ago)0194MITPHPPHP ^7.3|^8.0CI passing

Since Oct 13Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/nhalstead/transferable)[ Packagist](https://packagist.org/packages/nhalstead/transferable)[ Docs](https://github.com/nhalstead/transferable)[ RSS](/packages/nhalstead-transferable/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (4)Dependencies (4)Versions (6)Used By (0)

Laravel Transferable Model Relationships
========================================

[](#laravel-transferable-model-relationships)

Make laravel model relationships transferable!

This is perfect to use when you want a model relationships to me assigned to another model (of the same type) and not be deleted or set null.

Install
-------

[](#install)

```
composer require nhalstead/transferable
```

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

[](#how-to-use)

On the model its self you need to add in the use statement and optionally add in the implements to block the model from being deleted.

```

```

What makes it efficient? This will use the model's relationship to determine what needs to be updated in the database and runs a query on the DB to update the relationships without any extra calls to get all the IDs and detaching things.

### What else?

[](#what-else)

Nothing else, This package offers a few extra method for debugging and collecting information on the transferable relationships, see below:

```
// Return the number of transferable items attached to this model
$newUser->countTransferable();

// Return boolean if it would have any dangling relationships if deleted.
// The false param tells it not to throw an Exception
$newUser->hasDangling();

// Throw an exception when there are records dangling
$newUser->throwIfDangling();
```

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance57

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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 ~172 days

Total

4

Last Release

1527d ago

PHP version history (2 changes)1.0.0PHP ^7.3

1.0.2PHP ^7.3|^8.0

### Community

Maintainers

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

---

Top Contributors

[![nhalstead](https://avatars.githubusercontent.com/u/5577816?v=4)](https://github.com/nhalstead "nhalstead (27 commits)")

---

Tags

laravel-eloquentphp-laraveltransferable-relationshipslaraveleloquenttranserable

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nhalstead-transferable/health.svg)

```
[![Health](https://phpackages.com/badges/nhalstead-transferable/health.svg)](https://phpackages.com/packages/nhalstead-transferable)
```

###  Alternatives

[silber/bouncer

Eloquent roles and abilities.

3.6k4.4M25](/packages/silber-bouncer)[tucker-eric/eloquentfilter

An Eloquent way to filter Eloquent Models

1.8k4.8M26](/packages/tucker-eric-eloquentfilter)[watson/validating

Eloquent model validating trait.

9723.3M47](/packages/watson-validating)[cybercog/laravel-love

Make Laravel Eloquent models reactable with any type of emotions in a minutes!

1.2k302.7k1](/packages/cybercog-laravel-love)[cviebrock/eloquent-taggable

Easy ability to tag your Eloquent models in Laravel.

567694.8k3](/packages/cviebrock-eloquent-taggable)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.2M13](/packages/reedware-laravel-relation-joins)

PHPackages © 2026

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