Modules previously had their Filament resources injected into the main
admin panel and surfaced legacy addAdminLink() items as sidebar nav.
Invert this: each module owns a dedicated Filament panel and a navbar
panel switcher moves between the main panel and module panels.
- Add App\Contracts\Modules\PanelProvider: an abstract base that
pre-configures id (= module key), path (admin/{key}), middleware,
auth, branding, the shared admin theme/sidebar (viteTheme +
sidebarWidth 14.5rem for visual consistency), a Dashboard page, the
shared plugins, and discovery of the module's own
Filament/{Resources,Pages,Widgets}. Modules register it via their
providers list and override only moduleKey().
- Add PanelSwitcherPlugin: a topbar-left dropdown listing the main
panel plus every module panel the user can access, on every panel.
- Stop injecting module components into the core admin/system panels:
remove FilamentPanelExtender, its beforeResolving('filament') hook,
probeFilament(), and the boot-cache filament field (schema bump).
- Remove the legacy link APIs (addAdminLink/addFrontendLink/
registerLinks) and their blade/view consumers.
- Gate module panels via access:{module-key} in canAccessPanel(),
with the view:modules fallback.
- Migrate the Sample module to ship its own panel provider and drop
its old admin controller/route.
23 lines
578 B
JSON
23 lines
578 B
JSON
{
|
|
"name": "phpvms/sample-module",
|
|
"type": "phpvms-module",
|
|
"description": "A sample phpvms module",
|
|
"require": {
|
|
"composer/installers": "~1.0"
|
|
},
|
|
"extra": {
|
|
"laravel": {
|
|
"providers": [
|
|
"Modules\\Sample\\Providers\\SampleServiceProvider",
|
|
"Modules\\Sample\\Providers\\EventServiceProvider",
|
|
"Modules\\Sample\\Providers\\Filament\\SampleAdminPanelProvider"
|
|
]
|
|
}
|
|
},
|
|
"autoload": {
|
|
"psr-4": {
|
|
"Modules\\Sample\\": "."
|
|
}
|
|
}
|
|
}
|