Skip to content
Last updated

WHMCS\User\Client\Affiliate

Class · extends AbstractModel

Client affiliate information

If a WHMCS operator turns on the affiliate payment system, then a client account can become an affiliate. An affiliate record is attached to a specific client and provides configuration information to the affiliate system so that client can handle payments and commissions. It also tracks the balance available, amount withdrawn, and the number of visitors an affiliate has brought to an operator's WHMCS installation.

Methods

boot

public static function boot()

accounts

public function accounts(): Relation

client

public function client()

Each affiliate belongs to one client.

Returns \Illuminate\Database\Eloquent\Relations\BelongsTo

history

public function history(): Relation

hits

public function hits(): Relation

referrers

public function referrers(): Relation

withdrawals

public function withdrawals(): Relation

pending

public function pending(): Relation
public function getReferralLink(): string
public function getAdminLink(): string

getFullAdminUrl

public function getFullAdminUrl(): string

getPendingCommissionAmountAttribute

public function getPendingCommissionAmountAttribute(): float