Choosing Livewire or Inertia in Laravel Jetstream and Deciding on Teams
A decision guide that compares Jetstream's Livewire and Inertia stacks, outlines when to enable optional teams, and shows a concrete setup with validation steps.
20 Apr 2026, 17:40 UTC

Decision overview
Laravel Jetstream provides two UI scaffolding stacks: Livewire, which keeps most interactivity in Blade/PHP components, and Inertia, which pairs Laravel routes with client-side pages built with Vue or React. Jetstream also offers an optional teams feature that adds invitations, role-based membership and a current-team context. The choice of stack and whether to enable teams should be made before running the installer, because switching later usually requires regenerating views, tests and build configuration.
Constraints and assumptions
- Target Laravel version: 10.x (Jetstream 4.x is compatible). Confirm your exact supported pair before implementation.
- Sanctum is used for API token abilities.
- The project will need authentication, registration, email verification, two-factor authentication, profile management and session handling.
- Frontend tooling willingness: prefer minimal JavaScript build (Livewire) or accept a SPA build pipeline (Inertia).
Comparison table
| Aspect | Livewire | Inertia |
|---|---|---|
| Primary language | Blade + PHP components | Laravel controllers + Vue/React pages |
| JavaScript build | Optional (Alpine.js only) | Required (Vite, Vue/React) |
| State management | Handled server-side; minimal client state | Client-side state; hydration concerns |
| Testing surface | Feature tests + Livewire assertions | Feature tests + client-side test tools (e.g., Jest, Playwright) |
| Best fit | Admin panels, CRUD, server-rendered product flows | Highly interactive dashboards, SPA-like screens |
| Upgrade impact | Less likely to break when Laravel updates | May need adapter updates when Jetstream version changes |
Trade-offs
Livewire
Pros: reduces frontend tooling complexity, keeps most logic in PHP, easier to debug with Laravel's existing testing tools, smaller bundle size. Cons: UI reactivity is limited to what Livewire can emit; complex client-side interactions may require extra Alpine.js or custom JavaScript.
Inertia
Pros: enables a SPA-like experience while retaining Laravel routing and server-side validation; familiar component-based workflow for Vue/React developers. Cons: introduces a build step, client state management, hydration bugs, and a larger test surface that includes both PHP and JavaScript layers.
Teams feature decision
Enable Jetstream teams only when the application core requires:
- Inviting users to join a team.
- Assigning roles (e.g., admin, member) within a team.
- Switching the current team context in the UI.
- Scoping resources (projects, bills, documents) to a team rather than a single user.
If teams are only a future possibility, it is safer to start with team-less scaffolding. Adding teams later involves:
- Re-running the Jetstream installer with the teams flag (or republishing the teams configuration).
- Creating a
teamstable and adding ateam_idforeign key to user-owned models. - Updating policies and adding global scopes to enforce team-based access.
- Modifying Blade/Livewire or Inertia pages to show a team selector.
These changes affect authorization boundaries; incomplete scopes can leak data across teams.
Concrete implementation steps
The following example shows how to scaffold Jetstream with the Livewire stack and teams enabled, then validate the installation. Adjust the stack name (livewire or inertia) and the teams flag as needed. Run these commands in a local development environment where you have write access to the project directory and PHP, Composer and Node.js are installed.
1. Create a disposable Laravel project
composer create-project laravel/laravel jetstream-demo
cd jetstream-demo
composer require laravel/jetstream
2. Install Jetstream with your chosen stack
php artisan jetstream:install livewire --teams
The command publishes config/jetstream.php, creates Livewire components, updates routes/web.php, and adds the teams scaffold.
3. Inspect generated files (verification)
Check that the configuration reflects your choices:
grep -E 'stack|teams' config/jetstream.php
You should see entries such as 'stack' => 'livewire' and a teams feature flag; exact formatting varies by version. Confirm that team-related endpoints exist:
php artisan route:list | grep -E 'team|invitation'
4. Compile assets and start the development server
npm install && npm run dev
php artisan serve
Visit http://127.0.0.1:8000/register and verify that the registration flow includes team creation when teams are enabled.
5. Run the provided feature tests
Jetstream publishes a basic test suite. Execute it to ensure the core flows work:
php artisan test
Look for passing tests on registration, login, email verification, profile update, and team invitation acceptance. Add negative tests for cross-team access before treating team scoping as done.
6. Validate API token abilities (if needed)
Create a Sanctum token with a custom ability and confirm it is respected:
php artisan tinker
$user = App\Models\User::first();
$token = $user->createToken('test-token', ['server:update'])->plainTextToken;
Then use the token in a request to a route protected by an ability middleware and verify you receive a successful response; a request with a token lacking the ability should be rejected. Test first-party session authentication and third-party token flows separately, since they use different middleware.
Limitations and practical checks
- Switching from Livewire to Inertia (or vice-versa) after scaffolding usually requires re-running the installer and manually merging any customizations you added to components or pages.
- Jetstream's behavior is version-specific; always verify the exact Laravel/Jetstream pair (and Livewire/Inertia adapter availability) against your target release before committing to a stack.
- When teams are enabled, ensure that any new team-scoped model includes a
team_idcolumn and a global scope or query constraint that filters by the current team. Missing this step can expose data to unauthorized users. - Customize through published configuration and Fortify/Jetstream action classes rather than editing vendor files, so upgrades remain possible.
Summary
Choose Livewire for minimal JavaScript and simpler testing; choose Inertia when you need a rich SPA-like UI and are comfortable managing a frontend build pipeline. Enable Jetstream teams only if invitations, role-based membership and team context are core requirements from the start, because retrofitting teams involves migrations, policy changes and UI updates. Follow the installation, configuration and validation steps above to confirm that your choice works as expected before moving to production.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.