This commit is contained in:
Kavalar 2024-07-12 11:03:48 +03:00
parent 3df81597b6
commit 4273b8d490

View File

@ -4,17 +4,17 @@ namespace app\controllers;
use app\models\Question;
class QuestionController{
public function actionCreate()
public function actionCreate(): void
{
require "app/views/questionCreate.php";
}
public function actionGetQuestionsWithAnswers()
public function actionGetQuestionsWithAnswers(): array
{
return Question::with('AnswerController')->get()->toArray();
}
public function actionGetQuestionsWithUsers()
public function actionGetQuestionsWithUsers(): array
{
return Question::with('user')->get()->toArray();
}