Skip to main content
The panel’s configuration lives in config/lunar/panel.php, published by php artisan lunar:panel:install (or vendor:publish --tag=panel-config), and merged under the lunar.panel key.

Configuration reference

The lunar.panel middleware group

The panel registers and defaults to its own route_middleware group, lunar.panel, rather than the host application’s web group. The group is assembled from the same framework primitives as the default web group — cookie encryption, session handling, error sharing, CSRF protection, and route-model binding substitution — so session, cookie, and CSRF behavior read from the host’s own configuration exactly as they would under web. The reason is isolation: the panel ships its own Inertia middleware (Lunar\Panel\Http\Middleware\HandlePanelInertiaRequests) on every route. If the panel instead ran inside the host’s web group, any middleware the host application appends there — its own Inertia middleware, locale switching, tenancy, custom auth, rate limiting — would silently apply to panel routes too. Two Inertia middlewares stacked on one response is the most visible failure mode: the host’s share() props leak into panel responses, and the asset version() values disagree, triggering spurious full-page reloads. A host application that deliberately wants the web stack, or a bespoke stack, can still override route_middleware in the published config:
menus groups sections into named top-level navigation menus instead of listing every section as its own sidebar entry. Each entry maps a set of section keys to a menu:
Left empty (the default), sections render as individual top-level sidebar entries. The panel’s global search (the command palette) matches records with a SQL LIKE query by default. Setting search.scout_enabled to true (or the LUNAR_PANEL_SEARCH_SCOUT environment variable) routes matching through Laravel Scout instead, for any model that is indexed. This is what makes search tolerate typos: engines such as Meilisearch and Typesense provide fuzzy matching, where Scout’s database driver only matches substrings.
See the Search documentation for indexing models with Scout.