Skip to content

Commit 1ad1844

Browse files
committed
Allow for custom routes to use EasyAdmin's context, especially in templates
1 parent 94bd996 commit 1ad1844

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/EventListener/AdminRouterSubscriber.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ public function onKernelController(ControllerEvent $event): void
253253
*/
254254
private function getDashboardControllerFqcn(Request $request): ?string
255255
{
256-
$controller = $request->attributes->get('_controller');
256+
$controller = $request->attributes->get(EA::DASHBOARD_CONTROLLER_FQCN) ?: $request->attributes->get('_controller');
257257
$controllerFqcn = null;
258258

259259
if (\is_string($controller)) {

0 commit comments

Comments
 (0)