How to connect iron.io to my UserController.php
? Im using app/views
.
My code in app/views/iron/hello_worker.php
<?php
// Worker code can be anything you want.
echo "Starting HelloWorker at ".date('r')."\n";
echo "payload:";
$payload = getPayload();
print_r($payload);
$test = new Tests;
$test->content = "iron.io testing";
$test->save();
for ($i = 1; $i <= 5; $i++) {
echo "Sleep $i\n";
sleep(1);
}
echo "HelloWorker completed at ".date('r');
?>
I have made it work, but it has error in iron.io dashboard PHP Fatal error: Class 'Tests' not found in /mnt/task/hello_worker.php on line 8
Do you upload 1 file or entire project? You have to upload entire project. Also take a look at this packet.