kernel
This commit is contained in:
@ -1,14 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace app\controllers;
|
||||
|
||||
class Controller
|
||||
{
|
||||
protected \Twig\Loader\FilesystemLoader $loader;
|
||||
protected \Twig\Environment $twig;
|
||||
public function __construct()
|
||||
{
|
||||
$this->loader = new \Twig\Loader\FilesystemLoader(__DIR__.'/../views');
|
||||
$this->twig = new \Twig\Environment($this->loader, ['cache' => 'app/views/cache']);
|
||||
}
|
||||
}
|
@ -2,12 +2,13 @@
|
||||
namespace app\controllers;
|
||||
|
||||
use app\models\Question;
|
||||
use kernel\Controller;
|
||||
|
||||
|
||||
class QuestionController extends Controller{
|
||||
public function actionCreate()
|
||||
{
|
||||
echo $this->twig->render('questionCreate.html');
|
||||
echo $this->twig->render('question_create.html.twig');
|
||||
}
|
||||
|
||||
public function actionGetQuestionsWithAnswers(): array
|
||||
|
@ -2,9 +2,9 @@
|
||||
namespace app\controllers;
|
||||
|
||||
|
||||
use app\helpers\Debug;
|
||||
use app\models\Question;
|
||||
use app\models\User;
|
||||
use kernel\Controller;
|
||||
|
||||
class UserController extends Controller{
|
||||
public function actionCreate(): void
|
||||
|
Reference in New Issue
Block a user