Skip to content

multi dashboards with different host #7119

@ben29

Description

@ben29

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions