А можно и настоящую главную индексную страницу себе сделать, что-то типа:
<?php $this->layout('layout') ?>
<?php $this->push('title') ?>Motor cms<?php $this->stop() ?>
<?php $this->start('description') ?>Motor cms<?php $this->stop() ?>
<?php $this->start('breadcrumb') ?>
<nav>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/"><i class="bi bi-snow2"></i></a></li>
<li class="breadcrumb-item active">Motor cms</li>
</ol>
</nav>
<?php $this->stop() ?>
<h1>Главная Motor cms</h1>
<div class="">
<a href="#">Ссылка1</a>
</div>
<div class="">
<a href="#">Ссылка2</a>
</div>
<div class="">
<a href="#">Ссылка</a>
</div>
В HomeController.php вместо
$response->getBody()->write('Hello world');
Написать
return $this->view->render(
$response,
'index',
);
У меня так и было когда попробовал себе сделать Главную страницу и вроде бы все получилось.
И конечно же создать файл index.php в \resources\views
Изменил: Удаленный (15.02.2022 / 18:50)