PHPackages                             webazin/referral - 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. webazin/referral

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

webazin/referral
================

A Referral system for Laravel application

011PHP

Since Jan 5Pushed 2y agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

laravel-referral
================

[](#laravel-referral)

A Referral System With Laravel

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

[](#installation)

Via [Composer](https://getcomposer.org) to add the package to your project's dependencies:

```
composer require "webazin/referral @dev"
```

migrations

```
 php artisan migrate
```

Setup the model
---------------

[](#setup-the-model)

Add ReferralTrait Trait to your User model.

```
use Webazin\Referral\ReferralTrait

class User extends Model
{
    use ReferralTrait;
}
```

Params
------

[](#params)

```
App\User::find(1)->getRefLink();

App\User::find(1)->setParentId($referralCode);
App\User::find(1)->getParent();

App\User::find(1)->setReferralCode();
// if this set --- set parent id
App\User::find(1)->getReferralCodeFromCookie();

//relationships
App\User::find(1)->parent;
App\User::find(1)->child;

App\User::find(1)->referralCount();
```

License
-------

[](#license)

Licensed under the [MIT license](https://github.com/questocat/laravel-referral/blob/master/LICENSE).

###  Health Score

13

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity19

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/77ce3d4e5f45a422fb431d417329de94d8b99391fe2f131054f16fdb849a0f7a?d=identicon)[webazin](/maintainers/webazin)

---

Top Contributors

[![mahdi4187](https://avatars.githubusercontent.com/u/25785927?v=4)](https://github.com/mahdi4187 "mahdi4187 (14 commits)")

### Embed Badge

![Health badge](/badges/webazin-referral/health.svg)

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

###  Alternatives

[cubear/finder

Finder is a Drupal 8 module to help users find services which meet their criteria

404.2k](/packages/cubear-finder)

PHPackages © 2026

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