Answer the question
In order to leave comments, you need to log in
How to organize the following logic?
all guides write an example of how to make a blog
PostController
listAction
editAction
CommentsController
listAction
editAction
where to read how to do more complex things
let's say I have a header, post, comments and footer on the page if the
header and footer are put into controllers
{{ render(controller('headerController')) }}
{% block content %}{% endblock %}
{{ render(controller('footerController')) }}
PostControoller {
indexAction() {
.....
return [
"post" => $currentPostInfo,
"comments" => $commentModel->getComments($id),
"meta" => $helper->getItemsForHeaderAndFooter()
]
}
}
Answer the question
In order to leave comments, you need to log in
I don’t understand the point then from this MVC if it’s almost the same flat-php
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question