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

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

tonkra/referral
===============

Referral system package for Tonkra SMS

v1(11mo ago)05MITPHPPHP ^8.1

Since Mar 24Pushed 11mo agoCompare

[ Source](https://github.com/Tech-Needs-You/Tonkra-Referral)[ Packagist](https://packagist.org/packages/tonkra/referral)[ RSS](/packages/tonkra-referral/feed)WikiDiscussions PROD Synced 1mo ago

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

Tonkra SMS Referral System Package v1.0.0
=========================================

[](#tonkra-sms-referral-system-package-v100)

A Laravel package for adding a referral system to Tonkra SMS, designed for easy integration and seamless updates.

Features
--------

[](#features)

- Admin-managed referral system (enable/disable from settings)
- Custom referral links for users
- Registration flow modification without altering Tonkra SMS core files
- Optimized and secure

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

[](#installation)

### 1. Install the Package

[](#1-install-the-package)

Run the following command to install the package via Composer:

```
composer require tonkra/referral
```

### 2. Publish the Package Assets

[](#2-publish-the-package-assets)

Publish the configuration and migration files:

```
php artisan vendor:publish --provider="Tonkra\Referral\ReferralServiceProvider"
```

```
php artisan vendor:publish --tag=referral-config
php artisan vendor:publish --tag=referral-migrations
php artisan vendor:publish --tag=referral-seeders
```

### 3. Run Migrations

[](#3-run-migrations)

Migrate the database to create necessary tables:

```
php artisan migrate
```

### 4. Seed Initial Data (Optional)

[](#4-seed-initial-data-optional)

If the package includes seeders, run:

```
php artisan db:seed --class="Database\Seeders\ReferralDatabaseSeeder"
```

Configuration
-------------

[](#configuration)

### 1. Update `.env` File

[](#1-update-env-file)

Modify the `.env` file to include referral settings:

```
REFERRAL_ENABLED=true
REFERRAL_BONUS=5
REFERRAL_EMAIL_NOTIFICATION=true
REFERRAL_SMS_NOTIFICATION=true
REFERRAL_DEFAULT_SENDERID="TONKRA SMS" # Set your default sender ID for sms notifications
```

### 2. Verify Configuration File

[](#2-verify-configuration-file)

Check `config/tonkra_referral.php` to adjust settings as needed.

Usage
-----

[](#usage)

### 1. Generate a Referral Link

[](#1-generate-a-referral-link)

Users can generate their referral link:

```
$referralUser = ReferralUser::find(auth()->id());
echo $referralUser->referral_link;
```

### 2. Track Referrals

[](#2-track-referrals)

Referrals are automatically tracked when new users register using a referral link.

### 3. Admin Management

[](#3-admin-management)

Admins can enable or disable the referral system via the settings panel.

Updating the Package
--------------------

[](#updating-the-package)

To update the package, run:

```
composer update tonkra/referral
```

Troubleshooting
---------------

[](#troubleshooting)

- Run `php artisan config:clear` and `php artisan cache:clear` if settings don’t apply.
- Ensure migrations have been run: `php artisan migrate`.
- Check logs for errors: `storage/logs/laravel.log`.

License
-------

[](#license)

This package is licensed under the MIT License.

Support
-------

[](#support)

For support, contact the package maintainer or submit an issue on the repository.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance54

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community6

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

Unknown

Total

1

Last Release

346d ago

### Community

Maintainers

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

---

Top Contributors

[![Johnnywoode](https://avatars.githubusercontent.com/u/25925528?v=4)](https://github.com/Johnnywoode "Johnnywoode (16 commits)")

### Embed Badge

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

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

###  Alternatives

[wireui/wireui

TallStack components

1.8k1.3M16](/packages/wireui-wireui)[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4195.3M84](/packages/livewire-volt)[ramonrietdijk/livewire-tables

Dynamic tables for models with Laravel Livewire

21147.4k](/packages/ramonrietdijk-livewire-tables)

PHPackages © 2026

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