PHPackages                             eeappdev/laravel-external-id - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. eeappdev/laravel-external-id

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

eeappdev/laravel-external-id
============================

Make a morph-table to keep track of external id relationships for external API

0.0.4(3y ago)0211MITPHP

Since Jun 29Pushed 3y ago1 watchersCompare

[ Source](https://github.com/eeappno/laravel-external-id)[ Packagist](https://packagist.org/packages/eeappdev/laravel-external-id)[ RSS](/packages/eeappdev-laravel-external-id/feed)WikiDiscussions main Synced today

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Create a morph-table to keep track of external id/relationship
==============================================================

[](#create-a-morph-table-to-keep-track-of-external-idrelationship)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a00997906b91106f0fcdea6a5c4c596af62951b38f89a53b46958d748d407147/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f65656170706465762f6c61726176656c2d65787465726e616c2d69642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/eeappdev/laravel-external-id)[![Total Downloads](https://camo.githubusercontent.com/fa9a76704be0aa2ffbd6cd5122acb0ebf4228b2c796c31155e234f062ac28db2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f65656170706465762f6c61726176656c2d65787465726e616c2d69642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/eeappdev/laravel-external-id)

When you are working with an external API, and need to syncronize clients, products, services, categories or like, this package help you to store the external id for all the models you want.

This package provides a `HasExternalId` trait that, once installed on a model, allows you to do things like this:

```
// Store (update or create) the external id
$model->addExternalId('external_unique_id');

// Remove/unlink an external ID
$model->removeExternalId();

// Get the external ID
$model->getExternalID();

// Get all external information
$model->external()
```

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require eeappdev/laravel-external-id
```

You must publish the migration with:

```
php artisan vendor:publish --provider="Eeappdev\ExternalId\ExternalIdServiceProvider" --tag="migrations"
```

Migrate the `external_ids` table:

```
php artisan migrate
```

Usage
-----

[](#usage)

Add the `HasExternalId` trait to a model you like to use external relationships on.

```
use Eeappdev\ExternalId\HasExternalId;

class Client extends Model
{
    use HasExternalId;
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

Top contributor holds 92.3% 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

Unknown

Total

1

Last Release

1099d ago

### Community

Maintainers

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

---

Top Contributors

[![eeappno](https://avatars.githubusercontent.com/u/60288182?v=4)](https://github.com/eeappno "eeappno (12 commits)")[![malmic](https://avatars.githubusercontent.com/u/4970896?v=4)](https://github.com/malmic "malmic (1 commits)")

### Embed Badge

![Health badge](/badges/eeappdev-laravel-external-id/health.svg)

```
[![Health](https://phpackages.com/badges/eeappdev-laravel-external-id/health.svg)](https://phpackages.com/packages/eeappdev-laravel-external-id)
```

###  Alternatives

[scrivo/highlight.php

Server side syntax highlighter that supports 185 languages. It's a PHP port of highlight.js

71346.6M110](/packages/scrivo-highlightphp)[insolita/unused-scanner

Detect unused composer dependencies

4261.2M14](/packages/insolita-unused-scanner)[kartik-v/yii2-widget-typeahead

Enhanced Yii2 wrapper for the Twitter Typeahead plugin (sub repo split from yii2-widgets).

475.1M9](/packages/kartik-v-yii2-widget-typeahead)

PHPackages © 2026

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