Skip to content

Commit

Permalink
Update src/ViewRenderer.php
Browse files Browse the repository at this point in the history
  • Loading branch information
vjik authored Jun 19, 2024
1 parent 6d89b3f commit cf28370
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ViewRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ private function extractControllerName(object $controller): string
return $cache[$class];
}

if (preg_match('/.*controllers?\\\([\w\\\]+)controller$/iU', $class, $m) && !empty($m[1])) {
if (preg_match('/(?:.*controllers?\\\)([\w\\\]+)controller$/iU', $class, $m) && !empty($m[1])) {
$name = $m[1];
} elseif (preg_match('/(\w+)controller$/iU', $class, $m) && !empty($m[1])) {
$name = $m[1];
Expand Down

0 comments on commit cf28370

Please sign in to comment.