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 a969827 commit d8953adCopy full SHA for d8953ad
user_guide_src/source/incoming/routing/071.php
@@ -0,0 +1,15 @@
1
+<?php
2
+
3
+use Config\Services;
4
5
+// Get the router instance
6
+$router = Services::router();
7
8
+// Retrieve the fully qualified class name of the controller handling the current request.
9
+$controller = $router->controllerName();
10
11
+// Retrieve the method name being executed in the controller for the current request.
12
+$method = $router->methodName();
13
14
+echo "Current Controller: " . $controller . "<br>";
15
+echo "Current Method: " . $method;
0 commit comments