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_paramsJSON column onext_nav_editor_links - Parameters are optional—leave the repeater empty for static routes
Adding Parameters in the Navigation Manager
- Set Link Type to
Application Route. - Enter the route name exactly as registered in Laravel (e.g.
clients.show,billing.invoices.index). - In Route Parameters, click Add parameter for each key/value pair your route requires.
- 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 Type | How to Enter | Stored As |
|---|---|---|
| Strings / slugs | pro or monthly-plan | Plain string |
| Numeric IDs | 42 | String (Laravel casts internally when needed) |
| Booleans | true / false | String; treat as truthy/falsy downstream |
| Arrays / objects | Valid 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.
clientto matchRoute::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
- Route Name:
- Category Plans
- Route Name:
store.category.show - Parameters:
category→cloud-hosting
- Route Name:
- Invoice Listing with Filters
- Route Name:
billing.invoices.index - Parameters:
filters→{"status":"overdue","range":"30d"}
- Route Name:
How Parameters Are Used at Runtime
- Nav Editor calls
route($routeName, $link->resolved_route_params). - The
resolved_route_paramsaccessor 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.