Answer the question
In order to leave comments, you need to log in
Is a controller needed?
now I am writing a frontend for a certain system, the
router matches the url and directs everything to several controllers
function indexAction( $data )
{
switch()
{
case 1: return $this->render( [ "article" => [..], "events" => [ ..] ] );
case 2: return $this->render( [ "article" => [..], "related_articles" => [ ..] ] );
case 3: return $this->render( [ "folder" => [..], "child_articles" => [ ..] ] );
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question