File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -120,9 +120,10 @@ class: $namespaceContext,
120
120
// so we don't end up with templates/app/my/controller.html.twig
121
121
$ templateName = $ this ->controllerClassData ->getFullClassName (withoutRootNamespace: true , withoutSuffix: true );
122
122
123
- $ dir = $ this ->contextGenerator ->getDirTemplateByContext ('template ' , $ context );
123
+
124
+ $ path = str_replace ('controller/ ' ,'' ,Str::asFilePath ($ templateName ));
124
125
// Convert the twig template name into a file path where it will be generated.
125
- $ this ->twigTemplatePath = \sprintf ('%s%s ' , $ dir , $ this ->isInvokable ? '.html.twig ' : '/index.html.twig ' );
126
+ $ this ->twigTemplatePath = \sprintf ('%s%s ' , $ path , $ this ->isInvokable ? '.html.twig ' : '/index.html.twig ' );
126
127
127
128
$ this ->interactSetGenerateTests ($ input , $ io );
128
129
}
You can’t perform that action at this time.
0 commit comments