Cloee Docs
Paymenter ExtensionsNavBar Manager

Route Parameters

Route parameters let Nav Editor links target Laravel routes that expect dynamic values (IDs, slugs, filters, or nested resources). When a visitor clicks the lin

Route parameters let Nav Editor links target Laravel routes that expect dynamic values (IDs, slugs, filters, or nested resources). When a visitor clicks the link, the parameters are merged into the route helper before the SPA router (or a full page load) resolves the URL.

  • Applies only to Application Route links
  • Values are stored in the route_params JSON column on ext_nav_editor_links
  • Parameters are optional—leave the repeater empty for static routes

Adding Parameters in the Navigation Manager

  1. Set Link Type to Application Route.
  2. Enter the route name exactly as registered in Laravel (e.g. clients.show, billing.invoices.index).
  3. In Route Parameters, click Add parameter for each key/value pair your route requires.
  4. Save the link. Blank keys are ignored automatically.

The interface renders existing JSON as distinct rows on load, so edits stay readable even if parameters were created programmatically.


Value Formatting

Value TypeHow to EnterStored As
Strings / slugspro or monthly-planPlain string
Numeric IDs42String (Laravel casts internally when needed)
Booleanstrue / falseString; treat as truthy/falsy downstream
Arrays / objectsValid JSON (e.g. {"include":["stats","history"]})JSON object
  • Non-scalar values are preserved by saving valid JSON. On reload the UI converts them to JSON strings so you can see and edit them.
  • Use Laravel’s own route-model binding expectations for key names, e.g. client to match Route::get('/clients/{client}', ...).
  • If your route expects nested arrays, encode them as JSON (e.g. filters → {"status":"active","tags":["featured"]}).

Example Scenarios

  • Client Detail Page
    • Route Name: clients.show
    • Parameters: client → 42
  • Category Plans
    • Route Name: store.category.show
    • Parameters: category → cloud-hosting
  • Invoice Listing with Filters
    • Route Name: billing.invoices.index
    • Parameters: filters → {"status":"overdue","range":"30d"}

How Parameters Are Used at Runtime

  • Nav Editor calls route($routeName, $link->resolved_route_params).
  • The resolved_route_params accessor guarantees an array shape, defaulting to [] when none are set.
  • When Enable SPA navigation is on, parameters are passed through to the front-end router exactly as Laravel resolves them.
  • If a parameter is missing or has an unexpected format, Laravel will throw a route binding error—mirror the application’s expectations to avoid broken links.

Troubleshooting Tips

  • 404 or binding errors – confirm the parameter key matches the route placeholder ({parameter}) and the value exists in the database if model binding is involved.
  • JSON lost after save – ensure the value field contains valid JSON; malformed JSON is coerced to a string, so wrap content in braces or brackets as needed.
  • SPA navigation misbehaving – disable the SPA toggle for routes that require a full reload (e.g. Livewire-heavy pages) even when parameters are set correctly.

With correct parameters in place, Nav Editor keeps linked routes precise while still letting non-developers update navigation structure on the fly.


On this page