Download the PHP package kevupton/referrals without Composer
On this page you can find all versions of the php package kevupton/referrals. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package referrals
Referrals
Laravel bare-bones implementation of a referral queue system. Currently the main functionality this package provides is the manipulation and creation of the referral queue.
How it works
This referral system is based of queue jumping. The idea being that when someone signs up they are placed into a queue. Then whenever someone registers, they jump X places in the queue. The idea behind the queue itself is that it is to slowly grow over a period of time, to simulate users signing up, and hence a demand. Or a queue to jump.
Config File
This file handles everything to do with the queue itself. A commend on each field is there explaining what each does.
The Jobs
This packages uses the Laravel Queue to manage the sign-up queue. It is broken into 2 key jobs.
The first being AddMore
and the second being MoveInQueue
.
AddMore
This class handles adding more empty/fake subscribers to the queue itself. To use this class all you have to do
is call it once. Once it has run the first time it will continuously keep adding itself back to the queue, with the interval
time specified in referrals.addmore.interval
. Every time it runs it adds referrals.addmore.amount
subscribers to the queue.
Calling the job: $this->dispatch(new AddMore());
MoveInQueue
This class is responsible for moving a ReferQueue item to new position. It will move the queued_item to the new position and readjusting all the queued people in between.
Calling the job:
The Models
ReferQueue
This model represents a queued item. The refer_queue
table is the pending queue for the system. So whenever someone refers someone
this is the queue that they jump. The user_id
in this class refers to the actual subscriber. So you just have to choose the id to use
for this value, whether it is on the users
table by default or a custom subscribers
table;
it will just refer to the primary key of whichever table you use.
All versions of referrals with dependencies
kevupton/ethereal Version ^2.4.8
kevupton/laravel-package-service-provider Version ^0.0.5