Vue Pages
Concierge includes optional Vue 3 pages for managing members, users and invitations, plus a local-login button that works without them. They ship inside the Composer package, in vendor/tey/concierge/resources/js. The PHP code never depends on them or on Inertia.
| Export | From | What it is |
|---|---|---|
MembersPage, InviteMemberPage, MemberPage | @tey/concierge | Workspace pages; each takes the matching generated *PageProps type as its props |
UsersPage, InviteUserPage, UserPage | @tey/concierge | App-wide pages, for app-wide mode; see Users |
AcceptInvitationPage | @tey/concierge | Accepting an invitation, in either mode |
createConcierge({ adapter, labels?, locale? }) | @tey/concierge | The Vue plugin every page requires |
LocalLoginButton | @tey/concierge | A plain form for one-click local login; needs no plugin and no Inertia |
Avatar | @tey/concierge | A person's photo, or their initials on a stable colour; see Avatars |
ConciergeAdapter, defaultLabels and the generated contract types | @tey/concierge | Types for your own code |
createInertiaAdapter() | @tey/concierge/inertia | The adapter for Inertia; the only module that imports @inertiajs/vue3 |
Your app installs the peer dependencies: vue ^3.5, tailwindcss ^4.1 and, for the Inertia adapter, @inertiajs/vue3 ^3.
Adding the Pages to Your App
Concierge declares its frontend to mod, which Composer installs with it (tey/mod ^0.6.1). In a Vue starter kit app, mod wires it in for you.
1. Wire the Frontend with Mod
Preview the edits first. Nothing is written:
php artisan mod:install inertia --dry-runThen apply them:
php artisan mod:install inertiaThis adds:
- the
@tey/conciergealias toresolve.aliasinvite.config.ts, pointing atvendor/tey/concierge/resources/js; - the matching
compilerOptions.pathsintsconfig.json, for both@tey/conciergeand@tey/concierge/*, and the package sources toinclude; @source '../../vendor/tey/concierge/resources/js';toresources/css/app.css, so Tailwind sees the classes the pages use.
When mod can't recognize one of these files, it prints the line to add by hand instead of editing it.
2. Import the Stylesheet
Mod does not import concierge's stylesheet yet (#81). It defines the --concierge-* variables the pages are coloured with. In your CSS entry, after @import 'tailwindcss':
/* resources/css/app.css */
@import '../../vendor/tey/concierge/resources/css/concierge.css';Override any variable in an unlayered :root rule to restyle the pages, including the avatar colours.
3. The Plugin
Install it once, where your app creates the Vue app (in an Inertia app, setup() in createInertiaApp):
// resources/js/app.ts
import { createConcierge } from '@tey/concierge';
import { createInertiaAdapter } from '@tey/concierge/inertia';
app.use(createConcierge({ adapter: createInertiaAdapter() }));4. Wrapper Pages
Your app keeps its layout, breadcrumbs and flash messages. Write the four workspace wrapper pages into your app with one command:
php artisan concierge:pages --dry-run
php artisan concierge:pagesIt writes Members.vue, InviteMember.vue, Member.vue and AcceptInvitation.vue to resources/js/pages/Concierge. The three member pages use the starter kit's @/layouts/AppLayout.vue. They are yours to edit; render them with Inertia::render('Concierge/Members') and so on.
concierge:pages Adminputs them inresources/js/pages/Admininstead, and--in=<module>places them in a module of your app's mod layout.- A page that already exists stops the command and nothing is written. Pass
--skip-existingto keep your copies, or--forceto overwrite them. --jsonprints the plan or the result as JSON.
Mod lists the same recipe as mod:concierge/pages. The stubs are Vue only for now, and the Users pages have no stub yet.
To write a wrapper by hand, pass the server props straight through and use slots for the surrounding chrome:
<AppLayout>
<MembersPage v-bind="props">
<template #breadcrumbs>…</template>
</MembersPage>
</AppLayout>Every page has the slots header, breadcrumbs and aside. MembersPage and UsersPage also have empty, and UsersPage has column for your own columns.
The members list and the member header show each person's avatar. Build each UserSummary with UserSummary::for($user), and set Concierge::avatarUsing() if your app has photos.
Wiring by Hand
Without mod's installer, or in an app it can't recognize, make the same edits yourself.
Alias the Composer-installed sources in Vite, and dedupe the framework packages so vendor files use your app's copies:
// vite.config.ts
import path from 'node:path';
import { defineConfig } from 'vite';
export default defineConfig({
// ...your existing plugins
resolve: {
alias: { '@tey/concierge': path.resolve('vendor/tey/concierge/resources/js') },
dedupe: ['vue', '@inertiajs/vue3'],
},
});Mirror the alias in tsconfig.json paths: @tey/concierge → index.ts, and @tey/concierge/* → *.
Then import the stylesheet as in step 2. It also registers the package sources with @source, so a hand-wired app needs no separate @source line. Install the plugin as above.
How the Pages Talk to Your Server
- The pages never build routes. They navigate and submit only to URLs from their props, and a
nulllink hides the control. Your endpoints must still authorize every request: hidden UI is not security. - Verbs:
POSTto invite, suspend, reinstate, deactivate, restore, transfer ownership, resend, accept and log out;PUTfor role and profile changes;DELETEto remove and revoke. - The members search visits
metadata.refreshUrlwith the query parameterssearchandstatus. The users search addsrole, and leavesstatusout while it isactive. Empty values are left out. - Validation errors keyed
name,email,rolesorroles.Nshow on their fields. Any other key, such as a policy denial, shows as a form-level alert. - Repeated submits are ignored while a request is pending. Retry resends the identical request, so the endpoint must be idempotent.
- Ownership transfer requires typing the recipient's name. The server is expected to redirect through password confirmation.
Local Login Button
LocalLoginButton renders a native <form method="post"> to the URL in the offer. It does not need createConcierge or Inertia, only the Vite alias, the TypeScript paths and the CSS import from steps 1 and 2.
<script setup lang="ts">
import { LocalLoginButton, type LocalLoginOffer } from '@tey/concierge';
defineProps<{ localLogin: LocalLoginOffer | null; csrfToken: string }>();
</script>
<template>
<LocalLoginButton :offer="localLogin" :csrf-token="csrfToken" />
</template>On the server, pass the offer as the localLogin page prop (Local login).
| Prop | Type | Purpose |
|---|---|---|
offer | LocalLoginOffer | null | { url, email }. The button renders nothing when it is null or missing |
csrfToken | string, required | The session's CSRF token: shared from the server with Inertia, or csrf_token() in Blade. Sent as the hidden _token field |
label | string | Defaults to Sign in as <email> |
hint | string | Defaults to a line saying it is for local development only and skips the password and two-factor |
The form sends the token and nothing else: the server signs in as the account in its own configuration. While the request is in flight the button is disabled and shows a spinner. Errors, such as a soft-deleted account, come back in the session error bag under local_login; your page decides whether to show them.