phpvms/modules/Sample/composer.json
Arthur Parienté 13a2249b0c
feat(modules): give each module its own Filament panel with a switcher
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.
2026-06-17 22:41:34 +02:00

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\\": "."
}
}
}