<?php require __DIR__ . '/autoload.php'; $news = \App\Models\News::findLastNews(3); include __DIR__ . '/App/templates/index.php';
protected function actionIndex() { $this->view->news = \App\Models\News::findLastNews(3); $this->view->users = \App\Models\User::findAll(); echo $this->view->render(__DIR__ . '/../templates/index.php'); }
protected function actionIndex() { $this->view->news = News::findLastNews(5); $this->view->users = User::findAll(); echo $this->view->render(__DIR__ . '/../templates/admin.php'); }