- What Laravel versions does Breeze support?
- Laravel Breeze officially supports versions 11.x and earlier. It aligns with Laravel’s latest features like `php_binary()` and ValidationRule but isn’t designed for Laravel 12+ (use newer starter kits instead). Always check the [GitHub repo](https://github.com/laravel/breeze) for version-specific updates.
- Can I use Breeze with a pure Blade frontend (no Vue/React)?
- Yes, Breeze includes a `web` stack for Blade-based authentication. It provides pre-built Blade views for login, registration, and password reset, styled with Tailwind CSS. This is ideal for lightweight apps or teams avoiding JavaScript frameworks.
- How do I install Breeze in an existing Laravel project?
- Run `composer require laravel/breeze --dev` followed by `php artisan breeze:install`. Choose your stack (Blade, Inertia/Vue, or Inertia/React) during setup. The command handles migrations, controllers, views, and config files automatically. Ensure your project meets Breeze’s PHP/Laravel version requirements first.
- Does Breeze support server-side rendering (SSR) for SEO?
- Yes, Breeze’s Inertia stack supports SSR out of the box. When using Vue or React with Inertia, enable SSR in your `vite.config.js` and configure Laravel’s Inertia middleware. This is critical for apps needing SEO-friendly auth pages (e.g., marketing sites or blogs).
- How do I customize Breeze’s Tailwind styles?
- Extend Breeze’s Tailwind config by modifying `tailwind.config.js` in your project. Use `@layer` directives to override or add styles without losing updates from Breeze. For example, `@layer components { @apply ... }` targets specific classes. Always test changes after rebuilding assets (`npm run dev` or `npm run build`).
- Can I use Breeze with a custom user model or database schema?
- Breeze assumes Laravel’s default `users` table by default. To use a custom model, override the `Authenticatable` trait in your user model and update Breeze’s controllers (e.g., `LoginController`). Migrations and seeders will need manual adjustments. Document these changes for future maintenance.
- What testing tools does Breeze support?
- Breeze includes Pest test examples for auth flows (login, registration, password resets) but is compatible with PHPUnit. To use PHPUnit, replace `tests/Browser` with `tests/Feature` and adjust assertions. The test suite covers core auth logic, making it easy to extend for custom validation or middleware.
- How do I deploy Breeze with Node.js dependencies?
- Breeze requires Node.js for frontend assets (Vite, Tailwind). Include `node_modules` in your deployment (e.g., via Docker or CI/CD) or use a tool like Laravel Mix’s `npm install --production`. For shared hosting, ensure Node.js is available or use a pre-built asset bundle. Monitor `package.json` for breaking changes.
- What are the alternatives to Breeze for Laravel auth?
- For minimal auth, consider **Sanctum** (API-only) or **Jetstream** (feature-rich but heavier). **Fortify** (Laravel’s legacy package) is another option but lacks modern tooling. If you need customization, scaffold auth manually with Laravel’s built-in `make:auth` (deprecated in Laravel 11+) or use **Laravel UI** (older but flexible).
- How do I add multi-factor authentication (MFA) to Breeze?
- Breeze doesn’t include MFA by default, but you can integrate it using Laravel’s `two-factor` package (`composer require laravel/fortify`). Add the `EnsureTwoFactorEnabled` middleware to protected routes and update your user model. Follow the [Laravel docs](https://laravel.com/docs/authentication#two-factor-authentication) for implementation steps.