Install Lunar’s Inertia and Vue admin panel into a Laravel application.
Requirements
Lunar core (lunarphp/core) must already be installed and migrated before adding the panel — the panel authenticates against the staff table core creates and reads its permissions from core’s access control manifest.
Require the package
composer require lunarphp/panel
The service provider, Lunar\Panel\PanelServiceProvider, is auto-discovered. No manual registration is needed.
Run the installer
php artisan lunar:panel:install
This wraps two vendor:publish calls:
--tag=panel-config publishes the panel’s config to config/lunar/panel.php (merged under the lunar.panel key).
--tag=panel-all-assets --force copies the panel’s compiled build to public/vendor/lunar-panel/build, its favicons to public/vendor/lunar-panel/favicons, and the compiled build of every registered add-on module to public/vendor/lunar-panel/{key}.
On an interactive first run, the installer also offers to create the first admin staff account when none exists. Non-interactive runs (--no-interaction, or a deploy pipeline without a terminal) never prompt, so the command stays safe to re-run on every deploy.
Re-run php artisan lunar:panel:install after every package update. The host application serves pre-compiled assets, so a stale build is the most common cause of a change not appearing in the browser.
To publish only the panel’s own assets, without sweeping every registered add-on, use --tag=panel-assets instead of --tag=panel-all-assets.
Migrations
The panel ships two migrations, run as part of the standard php artisan migrate:
create_edit_drafts_table — backs the edit-drafts feature.
create_staff_preferences_table — stores per-staff UI preferences such as dark mode and sidebar collapse state.
Create a staff account
The panel authenticates against Lunar’s staff guard, backed by Lunar\Core\Models\Staff. Only staff with admin set to true, or an explicit permission, can sign in and act inside the panel — see Access control.The lunar:create-admin command, shipped with Lunar core, creates a staff account with admin set to true. Run interactively, it prompts for a name, email, and password:
php artisan lunar:create-admin
For scripted setups, pass the details as options instead:
lunar:panel:install offers to run this command on an interactive first run, so a fresh install usually already has its first account by this point.
Every staff login requires a second factor — an authenticator app or an emailed code. There is no password-only login path. See Access control for the enrollment flow.
Visit the panel
The panel is served at /{lunar.panel.path} — /panel by default, so a fresh install is reachable at https://your-app.test/panel. Change the path in config/lunar/panel.php; see Configuration.
Production asset publishing
Because the panel ships compiled assets rather than source, redeploying does not automatically pick up a new package version’s build. As part of every deploy, run:
This is exactly what lunar:panel:install runs, and it is safe to re-run on every deploy — it also sweeps builds for any add-on packages registered with the panel.
Local development
Inside this monorepo (or any setup using local path repositories), re-publishing assets after every rebuild is slow. Symlink the builds instead:
The panel’s own build: symlink the package’s public/build directory to public/vendor/lunar-panel/build. Because the symlink also exposes the package’s public/build/hot file, running npm run dev inside the panel package gives full Vite HMR in the host application with no further wiring. Favicons still need a one-off publish.
Add-on builds: run
php artisan lunar:panel:link
This symlinks every registered add-on module’s compiled build into public/vendor/lunar-panel/{key}, so a rebuild is picked up without re-publishing.
lunar:panel:link warns and skips a module if its build path does not exist yet (run npm run build in that module first), if a directory already exists at the target (remove it to allow a symlink), or if the link is already in place.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Lunar PHP","colors":{"primary":"#4bc7f8","light":"#4bc7f8","dark":"#4bc7f8"},"logo":{"light":"https://mintcdn.com/lunar-b8371d04/ZhguENt7LP0pq4Z_/logo/lunar-logo.svg?fit=max\u0026auto=format\u0026n=ZhguENt7LP0pq4Z_\u0026q=85\u0026s=c996daa3fdcce9daab23698d2d23a13a","dark":"https://mintcdn.com/lunar-b8371d04/ZhguENt7LP0pq4Z_/logo/lunar-logo-dark.svg?fit=max\u0026auto=format\u0026n=ZhguENt7LP0pq4Z_\u0026q=85\u0026s=3aadec4ff031bb880a6d89aa430993e4"},"favicon":"https://mintcdn.com/lunar-b8371d04/ZhguENt7LP0pq4Z_/favicon.svg?fit=max\u0026auto=format\u0026n=ZhguENt7LP0pq4Z_\u0026q=85\u0026s=62ef311645899e2e1404b36fcb216788","appearance":{"default":"dark"},"background":{"decoration":"grid"},"navbar":{"primary":{"type":"github","href":"https://github.com/lunarphp/lunar"}},"footer":{"socials":{"website":"https://lunarphp.com","x":"https://x.com/lunarphp","github":"https://github.com/lunarphp","discord":"https://lunarphp.com/discord","linkedin":"https://linkedin.com/company/lunarphp"}},"fonts":{"heading":{"family":"Poppins"}},"integrations":{"fathom":{"siteId":"KMZGQTYE"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"lunar-b8371d04","hasAudioNarration":false,"actualSubdomain":"lunar-b8371d04","customDomains":["docs.lunarphp.com"],"gitSource":{"type":"github","owner":"lunarphp","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":false,"edits":false,"issues":false},"entitlements":{},"buildId":"6b043d737a57ff01f3eba3f5","clientVersion":"0.0.4377","searchFilterCounts":[{"language":"default","tag":"Reference","count":94},{"language":"default","tag":"Core","count":78},{"language":"default","tag":"Extending","count":49},{"language":"default","tag":"Admin Panel","count":31},{"language":"default","tag":"Getting Started","count":29},{"language":"default","tag":"Guides","count":20},{"language":"default","tag":"Order Management","count":18},{"language":"default","tag":"Storefront","count":17},{"language":"default","tag":"Overview","count":16},{"language":"default","tag":"Catalog","count":15}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":".btn{background-color:hsl(197, 93%, 63%);color:white;padding:5px 20px;border-radius:7px}.btn:hover{background-color:hsl(197, 93%, 53%)}"}]}
{"page":{"pagePath":"2.x/admin/installation","slug":"/2.x/admin/installation","pageMetadata":{"title":"Installation","description":"Install Lunar's Inertia and Vue admin panel into a Laravel application.","href":"/2.x/admin/installation"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Install Lunar’s Inertia and Vue admin panel into a Laravel application.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Info,Tip,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`requirements`,children:`Requirements`}),`\n`,_jsxs(_components.p,{children:[`Lunar core (`,_jsx(_components.code,{children:`lunarphp/core`}),`) must already be installed and migrated before adding the panel — the panel authenticates against the staff table core creates and reads its permissions from core’s access control manifest.`]}),`\n`,_jsx(Heading,{level:`2`,id:`require-the-package`,children:`Require the package`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`composer`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` require`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` lunarphp/panel`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The service provider, `,_jsx(_components.code,{children:`Lunar\\\\Panel\\\\PanelServiceProvider`}),`, is auto-discovered. No manual registration is needed.`]}),`\n`,_jsx(Heading,{level:`2`,id:`run-the-installer`,children:`Run the installer`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`php`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` artisan`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` lunar:panel:install`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`This wraps two `,_jsx(_components.code,{children:`vendor:publish`}),` calls:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`--tag=panel-config`}),` publishes the panel’s config to `,_jsx(_components.code,{children:`config/lunar/panel.php`}),` (merged under the `,_jsx(_components.code,{children:`lunar.panel`}),` key).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`--tag=panel-all-assets --force`}),` copies the panel’s compiled build to `,_jsx(_components.code,{children:`public/vendor/lunar-panel/build`}),`, its favicons to `,_jsx(_components.code,{children:`public/vendor/lunar-panel/favicons`}),`, and the compiled build of every registered add-on module to `,_jsx(_components.code,{children:`public/vendor/lunar-panel/{key}`}),`.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`On an interactive first run, the installer also offers to create the first admin staff account when none exists. Non-interactive runs (`,_jsx(_components.code,{children:`--no-interaction`}),`, or a deploy pipeline without a terminal) never prompt, so the command stays safe to re-run on every deploy.`]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Re-run `,_jsx(_components.code,{children:`php artisan lunar:panel:install`}),` after every package update. The host application serves pre-compiled assets, so a stale build is the most common cause of a change not appearing in the browser.`]})}),`\n`,_jsxs(_components.p,{children:[`To publish only the panel’s own assets, without sweeping every registered add-on, use `,_jsx(_components.code,{children:`--tag=panel-assets`}),` instead of `,_jsx(_components.code,{children:`--tag=panel-all-assets`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`migrations`,children:`Migrations`}),`\n`,_jsxs(_components.p,{children:[`The panel ships two migrations, run as part of the standard `,_jsx(_components.code,{children:`php artisan migrate`}),`:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`create_edit_drafts_table`}),` — backs the edit-drafts feature.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`create_staff_preferences_table`}),` — stores per-staff UI preferences such as dark mode and sidebar collapse state.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`create-a-staff-account`,children:`Create a staff account`}),`\n`,_jsxs(_components.p,{children:[`The panel authenticates against Lunar’s staff guard, backed by `,_jsx(_components.code,{children:`Lunar\\\\Core\\\\Models\\\\Staff`}),`. Only staff with `,_jsx(_components.code,{children:`admin`}),` set to `,_jsx(_components.code,{children:`true`}),`, or an explicit permission, can sign in and act inside the panel — see `,_jsx(_components.a,{href:`/2.x/admin/access-control`,children:`Access control`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`lunar:create-admin`}),` command, shipped with Lunar core, creates a staff account with `,_jsx(_components.code,{children:`admin`}),` set to `,_jsx(_components.code,{children:`true`}),`. Run interactively, it prompts for a name, email, and password:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`php`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` artisan`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` lunar:create-admin`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`For scripted setups, pass the details as options instead:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`php`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` artisan`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` lunar:create-admin`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --firstname=Ada`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --lastname=Lovelace`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --email=ada@example.com`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --password=secret-password`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`lunar:panel:install`}),` offers to run this command on an interactive first run, so a fresh install usually already has its first account by this point.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Every staff login requires a second factor — an authenticator app or an emailed code. There is no password-only login path. See `,_jsx(_components.a,{href:`/2.x/admin/access-control`,children:`Access control`}),` for the enrollment flow.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`visit-the-panel`,children:`Visit the panel`}),`\n`,_jsxs(_components.p,{children:[`The panel is served at `,_jsx(_components.code,{children:`/{lunar.panel.path}`}),` — `,_jsx(_components.code,{children:`/panel`}),` by default, so a fresh install is reachable at `,_jsx(_components.code,{children:`https://your-app.test/panel`}),`. Change the path in `,_jsx(_components.code,{children:`config/lunar/panel.php`}),`; see `,_jsx(_components.a,{href:`/2.x/admin/configuration`,children:`Configuration`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`production-asset-publishing`,children:`Production asset publishing`}),`\n`,_jsx(_components.p,{children:`Because the panel ships compiled assets rather than source, redeploying does not automatically pick up a new package version’s build. As part of every deploy, run:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`php`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` artisan`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` vendor:publish`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --tag=panel-all-assets`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --force`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`This is exactly what `,_jsx(_components.code,{children:`lunar:panel:install`}),` runs, and it is safe to re-run on every deploy — it also sweeps builds for any add-on packages registered with the panel.`]}),`\n`,_jsx(Heading,{level:`2`,id:`local-development`,children:`Local development`}),`\n`,_jsx(_components.p,{children:`Inside this monorepo (or any setup using local path repositories), re-publishing assets after every rebuild is slow. Symlink the builds instead:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`The panel’s own build: symlink the package’s `,_jsx(_components.code,{children:`public/build`}),` directory to `,_jsx(_components.code,{children:`public/vendor/lunar-panel/build`}),`. Because the symlink also exposes the package’s `,_jsx(_components.code,{children:`public/build/hot`}),` file, running `,_jsx(_components.code,{children:`npm run dev`}),` inside the panel package gives full Vite HMR in the host application with no further wiring. Favicons still need a one-off publish.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Add-on builds: run`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`php`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` artisan`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` lunar:panel:link`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`This symlinks every registered add-on module’s compiled build into `,_jsx(_components.code,{children:`public/vendor/lunar-panel/{key}`}),`, so a rebuild is picked up without re-publishing.`]}),`\n`]}),`\n`]}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`lunar:panel:link`}),` warns and skips a module if its build path does not exist yet (run `,_jsx(_components.code,{children:`npm run build`}),` in that module first), if a directory already exists at the target (remove it to allow a symlink), or if the link is already in place.`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Installation","description":"Install Lunar's Inertia and Vue admin panel into a Laravel application.","href":"/2.x/admin/installation"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Requirements","slug":"requirements","depth":2,"children":[]},{"title":"Require the package","slug":"require-the-package","depth":2,"children":[]},{"title":"Run the installer","slug":"run-the-installer","depth":2,"children":[]},{"title":"Migrations","slug":"migrations","depth":2,"children":[]},{"title":"Create a staff account","slug":"create-a-staff-account","depth":2,"children":[]},{"title":"Visit the panel","slug":"visit-the-panel","depth":2,"children":[]},{"title":"Production asset publishing","slug":"production-asset-publishing","depth":2,"children":[]},{"title":"Local development","slug":"local-development","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/lunar-b8371d04/43e98106a0b337d4/tally-embed.js"],"subdomain":"lunar-b8371d04","siteName":"Lunar PHP","title":"Installation - Lunar PHP","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{"v1.x":{"href":"/1.x/admin/introduction","matchLevel":2},"v2.x (alpha)":{"href":"/2.x/admin/installation","matchLevel":0},"v0.x":{"href":"/0.x/getting-started/overview/introduction","matchLevel":4}},"firstHrefInLanguage":{}},"lastModified":"2026-09-01T19:27:35.302Z","originalFileLocation":"2.x/admin/installation.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Install Lunar\u0026#x27;s Inertia and Vue admin panel into a Laravel application.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Lunar PHP\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/lunar-b8371d04/VkxpWOT1bm2GLFiZ/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/lunar-b8371d04/VkxpWOT1bm2GLFiZ/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/lunar-b8371d04/VkxpWOT1bm2GLFiZ/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/lunar-b8371d04/VkxpWOT1bm2GLFiZ/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/lunar-b8371d04/VkxpWOT1bm2GLFiZ/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/lunar-b8371d04/VkxpWOT1bm2GLFiZ/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/lunar-b8371d04/VkxpWOT1bm2GLFiZ/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/lunar-b8371d04/VkxpWOT1bm2GLFiZ/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/lunar-b8371d04/VkxpWOT1bm2GLFiZ/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Installation - Lunar PHP\">\u003cmeta data-mint-head property=\"og:description\" content=\"Install Lunar\u0026#x27;s Inertia and Vue admin panel into a Laravel application.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Lunar PHP\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.lunarphp.com/2.x/admin/installation\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://lunar-b8371d04.mintlify.site/_mintlify/api/og/v2?division=Getting+Started\u0026amp;title=Installation\u0026amp;description=Install+Lunar%27s+Inertia+and+Vue+admin+panel+into+a+Laravel+application.\u0026amp;theme=cf06fc1a48ca28450a5a669d\u0026amp;signature=8d967fd0efd2efca07e1fa187bff328ba5c6c62d959c76a86155f17baa71e259\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Installation - Lunar PHP\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Install Lunar\u0026#x27;s Inertia and Vue admin panel into a Laravel application.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://lunar-b8371d04.mintlify.site/_mintlify/api/og/v2?division=Getting+Started\u0026amp;title=Installation\u0026amp;description=Install+Lunar%27s+Inertia+and+Vue+admin+panel+into+a+Laravel+application.\u0026amp;theme=cf06fc1a48ca28450a5a669d\u0026amp;signature=8d967fd0efd2efca07e1fa187bff328ba5c6c62d959c76a86155f17baa71e259\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/lunar-b8371d04/VkxpWOT1bm2GLFiZ/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Lunar PHP\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4bc7f8\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.lunarphp.com/2.x/admin/installation\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/2.x/admin/installation.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.lunarphp.com/#organization\",\"name\":\"Lunar PHP\",\"url\":\"https://docs.lunarphp.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/lunar-b8371d04/ZhguENt7LP0pq4Z_/logo/lunar-logo.svg?fit=max\u0026auto=format\u0026n=ZhguENt7LP0pq4Z_\u0026q=85\u0026s=c996daa3fdcce9daab23698d2d23a13a\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.lunarphp.com#website\",\"name\":\"Lunar PHP\",\"url\":\"https://docs.lunarphp.com\",\"publisher\":{\"@id\":\"https://docs.lunarphp.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.lunarphp.com/2.x/admin/installation#webpage\",\"url\":\"https://docs.lunarphp.com/2.x/admin/installation\",\"name\":\"Installation\",\"description\":\"Install Lunar's Inertia and Vue admin panel into a Laravel application.\",\"dateModified\":\"2026-09-01T19:27:35.302Z\",\"isPartOf\":{\"@id\":\"https://docs.lunarphp.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.lunarphp.com/2.x/admin/installation#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.lunarphp.com/2.x/admin/installation#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Getting Started\",\"item\":\"https://docs.lunarphp.com/2.x/admin/introduction\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Installation\",\"item\":\"https://docs.lunarphp.com/2.x/admin/installation\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.lunarphp.com/2.x/admin/installation#article\",\"headline\":\"Installation\",\"name\":\"Installation\",\"description\":\"Install Lunar's Inertia and Vue admin panel into a Laravel application.\",\"url\":\"https://docs.lunarphp.com/2.x/admin/installation\",\"mainEntityOfPage\":{\"@id\":\"https://docs.lunarphp.com/2.x/admin/installation#webpage\"},\"dateModified\":\"2026-09-01T19:27:35.302Z\",\"publisher\":{\"@id\":\"https://docs.lunarphp.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.lunarphp.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Lunar PHP\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Lunar PHP\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/2.x/admin/installation.md","siteName":"Lunar PHP","nav":{"global":null,"versions":[{"version":"v1.x","pages":[{"title":"v1.x","href":"/1.x/admin/introduction"}]},{"version":"v2.x (alpha)","tabs":[{"tab":"Getting Started","pages":[{"title":"Getting Started","href":"/2.x/getting-started/overview/introduction"}]},{"tab":"Guides","pages":[{"title":"Guides","href":"/2.x/guides/catalog-menu"}]},{"tab":"Reference","pages":[{"title":"Reference","href":"/2.x/reference/associations"}]},{"tab":"Admin Panel","groups":[{"group":"Getting Started","pages":[{"title":"Introduction","description":"An overview of Lunar's Inertia and Vue admin panel.","href":"/2.x/admin/introduction"},{"title":"Installation","href":"/2.x/admin/installation"},{"title":"Configuration","description":"The lunar.panel configuration reference for Lunar's Inertia and Vue admin panel.","href":"/2.x/admin/configuration"},{"title":"Access Control","href":"/2.x/admin/access-control"}]},{"group":"Add-on sections","pages":[{"title":"Bundles","href":"/2.x/admin/bundles"}]},{"group":"Extending","pages":[{"title":"Extending the Admin Panel","href":"/2.x/admin/extending/overview"},{"title":"Building an Add-on","sidebarTitle":"Add-ons","href":"/2.x/admin/extending/addons"},{"title":"Pages and Navigation","sidebarTitle":"Pages","href":"/2.x/admin/extending/pages"},{"title":"Slots","sidebarTitle":"Slots","href":"/2.x/admin/extending/slots"},{"title":"Extending Tables","sidebarTitle":"Tables","href":"/2.x/admin/extending/tables"},{"title":"Page Actions","sidebarTitle":"Page Actions","href":"/2.x/admin/extending/page-actions"},{"title":"Dashboard Widgets","sidebarTitle":"Widgets","href":"/2.x/admin/extending/widgets"},{"title":"Global Search","sidebarTitle":"Search","href":"/2.x/admin/extending/search"},{"title":"Edit Drafts","sidebarTitle":"Edit Drafts","href":"/2.x/admin/extending/edit-drafts"},{"title":"Form Slices","sidebarTitle":"Form Slices","href":"/2.x/admin/extending/form-slices"},{"title":"Discount Type Forms","sidebarTitle":"Discount Forms","href":"/2.x/admin/extending/discount-forms"},{"title":"Ordering with Position","sidebarTitle":"Ordering","href":"/2.x/admin/extending/ordering"},{"title":"Translating an Add-on","sidebarTitle":"Translations","href":"/2.x/admin/extending/translations"},{"title":"Testing an Add-on","sidebarTitle":"Testing","href":"/2.x/admin/extending/testing"},{"title":"Troubleshooting Add-ons","sidebarTitle":"Troubleshooting","href":"/2.x/admin/extending/troubleshooting"}]}]},{"tab":"Add-ons","pages":[{"title":"Add-ons","href":"/2.x/addons/filament/overview"}]},{"tab":"Support","pages":[{"title":"Support","href":"/support/community"}]},{"tab":"Flight Plan","pages":[{"title":"Flight Plan","href":"/logs/flight-plan"}]}]},{"version":"v0.x","pages":[{"title":"v0.x","href":"/0.x/getting-started/overview/introduction"}]}]},"basePath":"","title":"Installation - Lunar PHP","deploymentId":"dpl_Ab6nteg7kvyK8iL73naC2n7fmsWK","buildId":"dpl_Ab6nteg7kvyK8iL73naC2n7fmsWK","dynamics":[],"chunks":[]}