<?php

use common\models\Text;

/** @var yii\web\View $this */
/** @var Text[] $texts */
?>
<h1>Тексты</h1>

<?php if (!empty($texts)):
    foreach ($texts as $text):
        ?>
        <div>
            <h2><?= $text->title ?></h2>
            <p><?= $text->text ?></p>
            <img src="<?= '/uploads/' . $text->profile->image ?>"
        </div>
    <?php endforeach; else: ?>
    <h2>текстов нет</h2>
<?php endif; ?>
