Multi-level agent commission engine generator for Laravel + Filament
aldiazhar/laravel-agent-network is a Laravel package for multi-level agent commission engine generator for laravel + filament.
It currently has 0 GitHub stars and 6 downloads on Packagist (latest version v1.0.2).
Install it with composer require aldiazhar/laravel-agent-network.
Discover more Laravel packages by aldiazhar
or browse all Laravel packages to compare alternatives.
Last updated
Multi-level commission system generator for Laravel + Filament.
Generates migrations, models, events, listeners, and jobs directly into your app. Not a runtime library — generated code is yours to own and modify.
composer require aldiazhar/laravel-agent-network
1. Open the setup wizard
/agent-network/setup
Fill in network name, entity name, table prefix, and currency. Click Generate Files.
2. Run migrations
php artisan migrate
3. Create commission rules
/agent-network/commissions
4. Call from your app whenever a transaction occurs
use AgentNetwork\Facades\AgentNetwork;
AgentNetwork::transact(actorId: $agent->id, amount: $order->total, ref: $order->id);
{ "rate": 5 }
Actor transacts 1,000,000 × 5% → Actor earns 50,000
{ "rates": [{ "level": 1, "rate": 3 }, { "level": 2, "rate": 1 }] }
Actor transacts 1,000,000:
Parent (level 1) earns 30,000
Grandparent (level 2) earns 10,000
Depth is bounded by the number of entries in rates. Configure from the dashboard — no code changes needed.
{ "rate": 2 }
Actor transacts 1,000,000 × 2% → Direct parent earns 20,000
Rules are stored in the database and managed from /agent-network/commissions.
entity_type = null → global, applies to all actor typesentity_type = 'reseller' → applies only to actors of that typedatabase/migrations/
create_{entity}s_table.php
create_{prefix}commission_rules_table.php
create_{prefix}commission_ledgers_table.php
create_{prefix}transactions_table.php
app/Models/AgentNetwork/
{Entity}.php ← actor model (parent / children / ancestors)
CommissionRule.php
CommissionLedger.php
Transaction.php
app/Events/AgentNetwork/
TransactionRegistered.php
CommissionEarned.php
app/Listeners/AgentNetwork/
OnTransactionRegistered.php ← commission logic
OnCommissionEarned.php ← empty hook (notifications, etc.)
app/Jobs/
ProcessPayoutBatch.php ← empty hook (bank/wallet transfers)
config/agent-network.php
Standalone UI at /agent-network/*, separate from any Filament panel.
| Route | Description |
|---|---|
| /agent-network/setup | Generator wizard |
| /agent-network/commissions | Commission rules (Personal / Level / Group) |
| /agent-network/network | Actor hierarchy tree |
| /agent-network/dashboard | Overview stats |
| /agent-network/transactions | Transaction log |
| /agent-network/payouts | Pending commissions queue |
ProcessPayoutBatch.phpusers table — add the FK yourself if neededMIT