PHPackages                             ayzerobug/laravel-external-references - 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. ayzerobug/laravel-external-references

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

ayzerobug/laravel-external-references
=====================================

Easy link Laravel Models with external references for seamless integration and enhanced functionality.

v0.0.11(1mo ago)152.8k↓36.7%[1 PRs](https://github.com/ayzerobug/laravel-external-references/pulls)MITPHPPHP ^8.2CI passing

Since Sep 8Pushed 1w ago3 watchersCompare

[ Source](https://github.com/ayzerobug/laravel-external-references)[ Packagist](https://packagist.org/packages/ayzerobug/laravel-external-references)[ Docs](https://github.com/ayzerobug/laravel-external-references)[ GitHub Sponsors](https://github.com/Ayzerobug)[ RSS](/packages/ayzerobug-laravel-external-references/feed)WikiDiscussions main Synced yesterday

READMEChangelog (7)Dependencies (26)Versions (13)Used By (0)

[![](https://camo.githubusercontent.com/355c82fd54eca42fd28c70acf9b253efbda1365603afd710ba8774f5097b46a0/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f4c61726176656c25323045787465726e616c2532305265666572656e6365732e706e673f7468656d653d6461726b267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d61797a65726f6275672532466c61726176656c2d65787465726e616c2d7265666572656e636573267061747465726e3d706c7573267374796c653d7374796c655f31266465736372697074696f6e3d456173696c792b6c696e6b2b4c61726176656c2b4d6f64656c732b776974682b65787465726e616c2b646174612b666f722b7365616d6c6573732b696e746567726174696f6e2b616e642b656e68616e6365642b66756e6374696f6e616c6974792e266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667)](https://camo.githubusercontent.com/355c82fd54eca42fd28c70acf9b253efbda1365603afd710ba8774f5097b46a0/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f4c61726176656c25323045787465726e616c2532305265666572656e6365732e706e673f7468656d653d6461726b267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d61797a65726f6275672532466c61726176656c2d65787465726e616c2d7265666572656e636573267061747465726e3d706c7573267374796c653d7374796c655f31266465736372697074696f6e3d456173696c792b6c696e6b2b4c61726176656c2b4d6f64656c732b776974682b65787465726e616c2b646174612b666f722b7365616d6c6573732b696e746567726174696f6e2b616e642b656e68616e6365642b66756e6374696f6e616c6974792e266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667)

Manage External References in Laravel
=====================================

[](#manage-external-references-in-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/cf6a64c0d582a60108548c8ed54a7cacfd4ac8a64951fb1d59aeac2ff0f7c0c4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f61797a65726f6275672f6c61726176656c2d65787465726e616c2d7265666572656e6365732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ayzerobug/laravel-external-references)[![GitHub Tests Action Status](https://camo.githubusercontent.com/bda88b258335723b4cd2e285fb66f986065623ed8a83697c33c0c1cfe2c04168/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f61797a65726f6275672f6c61726176656c2d65787465726e616c2d7265666572656e6365732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/ayzerobug/laravel-external-references/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/36529301df016db7bd9b9be6ff9bb3079e1e55c15ea9129d769fe9e808410d96/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f61797a65726f6275672f6c61726176656c2d65787465726e616c2d7265666572656e6365732f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/ayzerobug/laravel-external-references/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/876dfbd4e84a8c12c40eb998dbc7bc1bad57d355904a85289d191cac0c454c75/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f61797a65726f6275672f6c61726176656c2d65787465726e616c2d7265666572656e6365732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ayzerobug/laravel-external-references)

This package facilitates the seamless integration of your Laravel Models with external systems or services by managing external references or identifiers. It streamlines the process of associating your application's data with external datasets, such as payment processor IDs or user accounts. This enhancement enables the smooth integration of your application with diverse services and systems, thereby augmenting its capabilities and adaptability.

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

[](#installation)

You can install the package via composer:

```
composer require ayzerobug/laravel-external-references
```

You can publish and run the migrations with:

```
php artisan vendor:publish --tag="external-references-migrations"
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --tag="external-references-config"
```

Usage
-----

[](#usage)

Include the HasExternalReferences trait in your model:

```
namespace App\Models;

use Ayzerobug\LaravelExternalReferences\Traits\HasExternalReferences;

class Payment extends Model
{
    use HasExternalReferences;

    ...
}
```

Set Payment External Reference:

```
use App\Models\Payment;

$payment = Payment::find($id);
$idOnPaystack = "random-id";
$payment->setExternalReference($idOnPaystack, 'paystack');
```

Get the external Reference

```
use App\Models\Payment;

$payment = Payment::find($id);
$idOnPaystack = $payment->getExternalReference('paystack');
```

Get Payment with the external Reference

```
use App\Models\Payment;

$idOnPaystack = "random-id";
$payment = Payment::findByExternalReference($idOnPaystack, 'paystack');
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Ayomide Micheal](https://github.com/ayzerobug)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance94

Actively maintained with recent releases

Popularity29

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 65% 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 ~87 days

Recently: every ~153 days

Total

8

Last Release

53d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/68833108?v=4)[Ayomide Micheal](/maintainers/Ayzerobug)[@ayzerobug](https://github.com/ayzerobug)

---

Top Contributors

[![ayzerobug](https://avatars.githubusercontent.com/u/68833108?v=4)](https://github.com/ayzerobug "ayzerobug (39 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (14 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (7 commits)")

---

Tags

externalidslaravelreferencelaravelAyzerobuglaravel-external-references

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/ayzerobug-laravel-external-references/health.svg)

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

###  Alternatives

[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

124603.0k](/packages/worksome-exchange)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[tarfin-labs/event-machine

Event-driven state machines for Laravel with event sourcing, type-safe context, and full audit trail.

199.4k](/packages/tarfin-labs-event-machine)[tapp/filament-form-builder

User facing form builder using Filament components

132.4k3](/packages/tapp-filament-form-builder)

PHPackages © 2026

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