I made a new bundle
routing.yml:
_jihtest:
pattern: /test
defaults: { _controller: JihTest:Index:index }
create file directory /src/Jih/Test/… (eg. /src/Jih/Test/Recources/views/Index/index.html.twig)
i might an Indexcontroller:
class IndexController extends Controller{
public function indexAction() {
return $this->render('JihTest:Index:index.html.twig');
}
}
but when go to the link it says: Unable to find template "JihTest:Index:index.html.twig".
what did i do wrong/forgot?
Best Answer
Controller's name matches the name of a folder. In your case the folder name starts with lowercase character "i". Rename it to "Index".