ironWorker 没有插入到我的数据库

ironWorker not inserting to my database

如何将 iron.io 连接到我的 UserController.php?我正在使用 app/views.

我的代码在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');
   ?>

我成功了,但是 iron.io 仪表板 PHP Fatal error: Class 'Tests' not found in /mnt/task/hello_worker.php on line 8

中出现错误

您上传的是 1 个文件还是整个项目?您必须上传整个项目。 另请查看 this packet.