Skip to content

Commit 919f0df

Browse files
committed
docs: add new Getting Routing Information & Accessing Active Filters for a Route
1 parent b9a327d commit 919f0df

File tree

1 file changed

+8
-0
lines changed
  • user_guide_src/source/incoming/routing

1 file changed

+8
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
3+
// Get the router instance.
4+
/** @var \CodeIgniter\Router\Router $router */
5+
$router = service('router');
6+
$filters = $router->getFilters();
7+
8+
echo 'Active Filters for the Route: ' . implode(', ', $filters);

0 commit comments

Comments
 (0)