<?php use Framework\Core\URL; ?> <h1 class="text-center"><?php echo $data['title']; ?> </h1> <p class="text-justify"><?php echo $data['content']; ?> </p> <a href="<?php echo URL::getPrev(); ?> " class="btn btn-default">< Повернутися</a>
<h1 class="text-center text-success">Posts</h1> <?php use Framework\Core\URL; foreach ($data as $post) { ?> <div class="col-sm-4"> <div class="panel panel-default"> <div class="panel-heading"><a href="http://<?php echo URL::getDomain() . '/posts/post/' . $post['id']; ?> "><?php echo $post['title']; ?> </a></div> <div class="panel-content"> <p><?php echo $post['content']; ?> </p> </div> </div> </div> <?php } ?> <form action="/posts/post/" method="post"> <input type="text" name="testText"> <button>Add</button> </form>