Skip to content

Navigation

This page is generated from public package documentation in capell-4/packages and the package manifest checked into the source repository.

FieldValue
Composer packagecapell-app/navigation
Package slugnavigation
Product groupCapell Foundation
Tierfree
Bundlefoundation
Runtime contextsadmin, frontend, console
Capell version^4.0
Source repositorycapell-app/packages
Source pathpackages/navigation
Docs sourcepackages/navigation/docs
Manifestcapell.json

Navigation owns editor-managed menus and renders structured navigation data for Capell frontend themes.

  • Package: capell-app/navigation
  • Namespace: Capell\Navigation\
  • Surfaces: Filament admin, console, database
  • Service providers: packages/navigation/src/Providers/NavigationServiceProvider.php
  • Capell dependencies: capell-app/admin, capell-app/frontend
  • Adds site and language scoped navigation trees so editors can manage menus without editing theme code.
  • Keeps page navigation fields, sync actions, and frontend loaders together for predictable theme rendering.
  • Helps developers connect themes to editor-managed menus through package-owned loaders instead of direct page queries in Blade.

Navigation adds site and language scoped navigation trees, page navigation fields, sync actions, and frontend loading support.

  • Navigation Filament resource.
  • Navigation relation manager on sites.
  • Page schema extender for navigation placement.
  • Navigation item model resolution.
  • Actions to add, remove, replicate, and resolve navigation entries.
  • Navigation loader support for frontend rendering.

For developers: Stores navigation items in structured data and uses adapters/registries to connect navigable models without hard-coding page logic everywhere.

For teams: Lets editors manage menus for each site and language while keeping page selection tied to Capell records.

This package makes its Composer dependencies visible because they are part of the value proposition, not just plumbing. When an upstream package has a public repository, its linked preview card points readers back to the maintainers so their work gets proper credit.

Capell packages used here

Open-source packages used here

  • No extra third-party Composer package beyond the Capell package stack is required here.

Screenshots are generated from docs/screenshots.json during package deployment.

  • Navigation admin index.
  • Create/edit navigation form.
  • Site relation manager for navigations.
  • Page form navigation tab.
  • Frontend menu output.
  • NavigationServiceProvider registers the package.
  • Migration creates navigations.
  • Model: Navigation.
  • Filament resource: NavigationResource.
  • Policy: NavigationPolicy.
  • Events/listeners handle creation and site replication.
AreaPathPurpose
Actionspackages/navigation/src/ActionsDomain operations. Test these directly where possible.
Datapackages/navigation/src/DataStructured payloads, form state, view models, and integration data.
Enumspackages/navigation/src/EnumsPersisted states and Filament option values.
Modelspackages/navigation/src/ModelsEloquent records owned by the package.
Filamentpackages/navigation/src/FilamentAdmin resources, pages, widgets, and settings UI.
Providerspackages/navigation/src/ProvidersRegistration, extension hooks, routes, migrations, and resources.
Resourcespackages/navigation/resourcesViews, translations, assets, and package resources.
Databasepackages/navigation/databaseMigrations, seeders, and settings migrations.
Testspackages/navigation/testsPackage-level Pest coverage.
  • Resources: NavigationResource.
  • Pages: CreateNavigation, EditNavigation, ListNavigations.
  • capell:navigation-demo {--sites=} {--languages=} (packages/navigation/src/Console/Commands/DemoCommand.php)
  • capell:navigation-setup {--sites=} (packages/navigation/src/Console/Commands/SetupCommand.php)
  • navigations stores key, type, site, language, items JSON, meta, and visibility windows.

  • Navigation items may reference pages and page URLs through JSON.

  • Navigations connect to sites, languages, and types.

  • Cache key enum indicates navigation cache behaviour.

  • Models: Navigation.

  • Migrations: 2026_05_10_190860_01_create_navigations_table.php.

  • Data objects live in src/Data/; use them for payloads, form state, and view models.

  • Contracts: NavigationNamesResolver, NavigationPageSyncer.
  • Events: NavigationCreating.
  • Listeners: ReplicateSiteNavigationsListener.
  • Register Capell extension points, routes, migrations, settings, render hooks, and resources from service providers.
  • Adds navigations table.
  • Adds navigation admin resource and site relation manager.
  • Extends page and site admin schemas.
  • No explicit public route is registered by this package.
  • Adds setup and demo commands.
  • Install with composer require capell-app/navigation in the host Capell application.
  • Run migrations through the host application package install flow.
  • In this repository, verify package changes with vendor/bin/pest; do not use php artisan.
  • NavigationResource (packages/navigation/src/Filament/Resources/Navigations/NavigationResource.php)

  • CreateNavigation (packages/navigation/src/Filament/Resources/Navigations/Pages/CreateNavigation.php)

  • EditNavigation (packages/navigation/src/Filament/Resources/Navigations/Pages/EditNavigation.php)

  • ListNavigations (packages/navigation/src/Filament/Resources/Navigations/Pages/ListNavigations.php)

  • Policy: NavigationPolicy (packages/navigation/src/Policies/NavigationPolicy.php)

  • Create language/site records before creating scoped navigation.
  • Resolve stale page references after deleting pages.
  • Clear navigation cache after manual data changes.

Run package tests from the repository root:

Terminal window
vendor/bin/pest packages/navigation/tests --configuration=phpunit.xml
  • Put behaviour changes in src/Actions/; UI classes, commands, and controllers should call actions instead of owning domain logic.
  • Use package Data classes at boundaries instead of passing anonymous arrays between layers.
  • Use backed enums for persisted values and enum labels for Filament options.