Apex Software Platform
Apex Training - Transaction Controller
Within our library class you will notice we added a transaction to the winner's account with the controller "lottery_win", so let's go ahead and create that controller now. Within terminal, type:
This will create a new PHP file at /src/transaction/controller/transaction/lottery_win.php, and will assign it to our "training" package, so it's included during publishing to a repository. Open this file, and enter the following contents:
This class simply defines the default name of ththe transaction within the properties, returns the amount of the transaction via the
That's it. Everything is in place now, so if desired, visit the Maintenance->Cron Manager menu of the administration panel, and you can execute the "pick_winner" crontab job we previously created, which should now go through fine.
Next up, let's quickly develop the menus that we initially defined within our package.php file. Let's start by developing the Admin Settings View.
Need a Developer?
Taking work, any size or scope, and your imagination is the only limit. Contact me for a free consultation at [email protected].
Subscribe to the low traffic mailing list to stay updated on Apex.