public function actionCreateAgenda() { $model = new Agenda(); $model->owner = $_POST['owner']; $content = json_decode($_POST['data']); $slotbuff = json_decode($_POST['slotbuff']); $model->lastUpdate = $_POST['date']; $status = $model->saveAgenda($content, $slotbuff); $value = array('status' => $status); echo json_encode($value); }