PHPackages                             lopatin96/laravel-referrals - 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. lopatin96/laravel-referrals

AbandonedLibrary

lopatin96/laravel-referrals
===========================

Laravel blog

1.0.5(1y ago)01.8kMITPHPPHP &gt;=8.0

Since Oct 14Pushed 1y ago1 watchersCompare

[ Source](https://github.com/lopatin96/laravel-referrals)[ Packagist](https://packagist.org/packages/lopatin96/laravel-referrals)[ RSS](/packages/lopatin96-laravel-referrals/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (1)Versions (7)Used By (0)

Install
=======

[](#install)

### Trait

[](#trait)

Add `HasReferrals` trait to User model.

```
use Atin\LaravelReferrals\Traits\HasReferrals;

class User extends Authenticatable
{
    use HasReferrals;
```

### Register the Middleware

[](#register-the-middleware)

Ensure that your `HandleReferral` middleware is properly registered in the `app/Http/Kernel.php` file.

```
protected $middleware = [
    …
    \Atin\LaravelReferrals\Middleware\HandleReferral::class, // Add your middleware here
];
```

### Run Migrations

[](#run-migrations)

```
php artisan migrate
```

Usage
=====

[](#usage)

Now users can get their referral link like this:

```
{{ auth()->user()->getReferralLink() }}
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

Total

6

Last Release

523d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0ed7ade2d44e2f66eedf7dec7136ca591145f77d8192bdd789e04797c575d0f3?d=identicon)[Vladyslav Lopatin](/maintainers/Vladyslav%20Lopatin)

---

Top Contributors

[![lopatin96](https://avatars.githubusercontent.com/u/18104593?v=4)](https://github.com/lopatin96 "lopatin96 (8 commits)")

### Embed Badge

![Health badge](/badges/lopatin96-laravel-referrals/health.svg)

```
[![Health](https://phpackages.com/badges/lopatin96-laravel-referrals/health.svg)](https://phpackages.com/packages/lopatin96-laravel-referrals)
```

PHPackages © 2026

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