EasyAdminBundle icon indicating copy to clipboard operation
EasyAdminBundle copied to clipboard

multi dashboards with different host

Open ben29 opened this issue 3 months ago • 0 comments

Describe the bug

I have 2 dashboards, each dashboard has unique folder (and namespace), and should serve by specific HOST.

for admin and files:

src/Controller/Admin

for aff and files:

src/Controller/Aff/

AdminDashboardController.php

#[AdminDashboard(routePath: '/', routeName: 'admin', routeOptions: ['host' => 'admin.site.com'], routes: [
    'index' => ['routeName' => 'index', 'routePath' => '/'],
    'new' => ['routeName' => 'create', 'routePath' => '/create'],
    'edit' => ['routeName' => 'edit', 'routePath' => '/edit-{entityId}'],
    'delete' => ['routeName' => 'delete', 'routePath' => '/remove/{entityId}'],
    'detail' => ['routeName' => 'detail', 'routePath' => '/view/{entityId}'],
])]
final class AdminDashboardController extends AbstractDashboardController

AffDashboardController.php

#[AdminDashboard(routePath: '/', routeName: 'affiliate', routeOptions: [
    'host' => 'aff.site.com',
]]
class AffDashboardController extends AbstractDashboardController

route options host doesn't respect to generate all admin/ aff links. so all the admin links to crud actions, using host of 'ANY'.

but only the "admin" url or "affiliate" , respect this host,

Image Image

here all the for example my OrderCrudController routes:

Image

To Reproduce Steps to reproduce this error and also, the EasyAdmin version used.

(OPTIONAL) Additional context If they are useful, include logs, code samples, screenshots, etc.

ben29 avatar Oct 08 '25 19:10 ben29