31 lines
685 B
PHP
31 lines
685 B
PHP
<?php
|
|
/**
|
|
* @package Bicycle
|
|
* @author Egor Isaev
|
|
* @description NewsController.php
|
|
* @copyright (c) 07/08/2026
|
|
*/
|
|
|
|
namespace App\Controller;
|
|
|
|
use System\Classes\Controller;
|
|
|
|
/**
|
|
* Страница «Новости». URL: /news
|
|
*/
|
|
class NewsController extends Controller
|
|
{
|
|
/**
|
|
* @return string
|
|
* @throws \System\Classes\MyException
|
|
*/
|
|
public function indexAction(): string
|
|
{
|
|
$news = [
|
|
['date' => '2026-08-07', 'title' => 'Запущен Bicycle', 'text' => 'Первый релиз самописного PHP MVC-фреймворка.'],
|
|
];
|
|
|
|
return $this->render('news', ['news' => $news]);
|
|
}
|
|
}
|