alshenetsky/easyadmin-breadcrumbs
Pros:
AdminContext and Crud::PAGE_* constants for tight coupling. This ensures breadcrumbs align with EasyAdmin’s navigation logic (e.g., filters, entity CRUD actions).Users → Edit User → User Orders).gather()/provide()/configure() methods to pass context-specific data (e.g., entity IDs, filters) up/down the breadcrumb chain, enabling dynamic URLs and names.BreadcrumbNotApplicableException prevents 500 errors when filters reset or breadcrumbs become invalid.Cons:
AdminContext, AdminUrlGenerator). Future EasyAdmin breaking changes (e.g., URL generation) could require updates.Breadcrumb classes for each route, which may scale poorly for large admin panels with many CRUD actions.{{ breadcrumbs() }} with minimal styling hooks (e.g., no built-in support for icons, badges, or dynamic classes).AdminUrlGeneratorInterface). If using an older version, migration or forks may be needed.BreadcrumbType), so older PHP versions are unsupported.symfony/config, symfony/http-kernel) and widely used.gather()/provide()/configure() flow is powerful but complex. Misconfigurations (e.g., incorrect filter keys or missing getParent()) can lead to broken breadcrumbs or runtime errors.supports() or exception handling.provide() calls could introduce minor overhead, though unlikely to be significant.BreadcrumbNotApplicableException.Breadcrumb classes to routes to simplify debugging.Breadcrumb classes may be required.supports() or gather() could increase maintenance.AdminUrlGeneratorInterface compatibility.AdminContext is properly configured.composer require alshenetsky/easyadmin-breadcrumbs
templates/bundles/EasyAdminBundle/layout.html.twig and add {{ breadcrumbs() }} to the content_header_wrapper block.AbstractBreadcrumb for each route requiring breadcrumbs (start with high-traffic or complex routes)./admin/user)./admin/user/1/edit)./admin/order?filters[userId]=1).AdminContext or URL generation API changes.AdminUrlGeneratorInterface updates).BreadcrumbNotApplicableException to hide breadcrumbs gracefully when context is invalid.User, Order, Product).User Orders linked from Edit User).gather()/provide() logic for filter-dependent routes.AdminContext).Breadcrumb classes, reducing coupling with route changes.getParent() makes navigation structure explicit.Breadcrumb class. Use generators or templates to reduce duplication.AbstractEntityBreadcrumb to DRY up common logic (e.g., getEntityFqdn()).gather()/provide() chain. Log BreadcrumbData in development for complex cases.AdminContext or URL generation could break breadcrumbs. Subscribe to EasyAdmin’s changelog.configure() sets correct setUrl() or setEntityId().getType()/getEntityFqdn() match the current route.gather()/provide() keys align with parent breadcrumbs.AdminContext and BreadcrumbData.supports() or configure() for complex logic.Breadcrumb class) for quick reference.supports() logic (e.g., filterHow can I help you explore Laravel packages today?