Exemplo n.º 1
0
 /**
  * Get Task data
  * @param $id
  * @param $controller
  * @return mixed
  * @throws Exception
  */
 public static function getData($id, $controller)
 {
     $task = Task::findOne($id);
     if ($task !== null && $task->action == $controller->route) {
         return Json::decode($task->data, true);
     } else {
         throw new Exception("Data not found");
     }
 }