diff --git a/src/Controller/HierarchicalRoutesController.php b/src/Controller/HierarchicalRoutesController.php index fcb72b3..6f2b6d8 100644 --- a/src/Controller/HierarchicalRoutesController.php +++ b/src/Controller/HierarchicalRoutesController.php @@ -37,12 +37,16 @@ public function connect(Application $app) $ctr ->match("/{slug}", [$this, 'recordExactMatch']) ->assert('slug', $requirement->anyRecordRouteConstraint()) + ->before('controller.frontend:before') + ->after('controller.frontend:after') ->bind('hierarchicalroutes.record.exact') ; $ctr ->match("/{slug}", [$this, 'listingExactMatch']) ->assert('slug', $requirement->anyListingRouteConstraint()) + ->before('controller.frontend:before') + ->after('controller.frontend:after') ->bind('hierarchicalroutes.listing.exact') ; @@ -51,6 +55,8 @@ public function connect(Application $app) ->match("/{parents}/{slug}", [$this, 'recordPotentialMatch']) ->assert('parents', $requirement->anyPotentialParentConstraint()) ->assert('slug', '[a-zA-Z0-9_\-]+') // this may result in a 404 + ->before('controller.frontend:before') + ->after('controller.frontend:after') ->bind('hierarchicalroutes.record') ;