We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 05a4d91 commit 0e4d433Copy full SHA for 0e4d433
src/Mvc/Views/Html.php
@@ -41,7 +41,14 @@ public function render( array $Data ): string
41
$Path = "$BasePath/resources/views";
42
}
43
44
- $ControllerName = new NString( $this->getController() )->toSnakeCase();
+ // Convert controller name to snake_case, preserving directory separators
45
+ $controllerParts = explode( '/', $this->getController() );
46
+ $snakeCaseParts = array_map(
47
+ fn( $part ) => ( new NString( $part ) )->toSnakeCase(),
48
+ $controllerParts
49
+ );
50
+ $ControllerName = implode( '/', $snakeCaseParts );
51
+
52
$View = "$Path/$ControllerName/{$this->getPage()}.php";
53
54
if( !file_exists( $View ) )
0 commit comments