public function actionGrouptocategory($keys, $category_id, $this_category_id) { // Вывод по формату json Yii::$app->response->format = Response::FORMAT_JSON; // Получаем ответ от модели if (Product::Grouptocategory($keys, $category_id, $this_category_id)) { return array('one' => date('Y-m-d H:i:s'), 'two' => true); } else { return false; } }