Laravel Breeze: First steps to install and use authentication

Video thumbnail

When you start a project in Laravel and need authentication, one of the first important decisions is which solution to use. For years, I have seen many developers jump straight into Jetstream or more complex solutions, when in reality Laravel Breeze is usually the best starting point, although it is important to mention that Laravel Breeze is no longer an official package for base Laravel (without Livewire or Inertia) and I would usually recommend that you create a Livewire project and take advantage of the authentication module it provides or use Fortify.

In this guide, I show you the first steps with Laravel Breeze, from what it is and when to use it, to the actual installation, common errors, and what to check after getting it running. It’s not just theory: it’s exactly the workflow I use and teach in my projects, courses, and books.

What is Laravel Breeze and when to use it

Laravel Breeze is the official Laravel starter kit for implementing basic authentication quickly and cleanly. It includes everything necessary to get started without overloading the project.

Laravel Breeze is defined in the official documentation as:

"Laravel Breeze is a minimal, simple implementation of all of Laravel's authentication features, including login, registration, password reset, email verification, and password confirmation. Laravel Breeze's default view layer is made up of simple Blade views styled with Tailwind CSS."

And in short, it offers us two project-level configurations:

  1. Install and configure Tailwind.css and Alpine.js (which is no longer necessary in modern versions of Laravel as they are included by default).
  2. Install and configure a simple authentication schema, registration, password recovery, and middleware for access control.

What Laravel Breeze includes by default

By installing Breeze, you get, among other things:

  • User registration
  • Login and Logout
  • Password recovery
  • Email verification
  • User profile page
  • Authentication middleware (auth, verified)
  • Ready-to-use views with Tailwind CSS

Differences between Breeze, Jetstream, and Fortify

This is where many get confused when starting:

  • Fortify: backend only, no views. Ideal if you want to build the entire frontend from scratch.
  • Jetstream: very complete, with teams, 2FA, and more. Perfect for large apps.
  • Breeze: ideal balance between functionality and control.

Breeze is the best choice for learning and for small or medium projects, including MVPs.

For what type of projects do I recommend Laravel Breeze?

I recommend Breeze when:

  • You are taking your first steps with Laravel
  • You want quick authentication without complexity
  • You need a clear base to customize later
  • You prefer to understand what happens "under the hood"

Important to note that it is not the goal of this book to learn Tailwind.css or Alpine.js; therefore, it is assumed the reader has some knowledge of these; we will try to use these technologies in a simple way, but if you feel lost at any point, as a general recommendation, you can pause the chapter and study these technologies a bit; you will find introductions to these technologies on my YouTube channel.

Laravel Breeze is a basic authentication package that can be installed via composer; it is a package developed exclusively for Laravel that allows adding authentication functionality to a Laravel application in a simple way. Breeze uses Blade, Vue, or React templates to generate each of the visual screens and, of course, the corresponding controllers to process the requests.

By installing Breeze, the application automatically has modules for password recovery, email verification, login, and registration, plus…

Breeze includes a profile page to update basic data of the authenticated user; and with a few changes, you can add a simple role system in the user module, which is a configuration we do in the full course and book about Laravel.

The page for the package we are going to install is at:

https://laravel.com/docs/master/starter-kits

Prerequisites before installing Laravel Breeze

Before installing Breeze, it is advisable to review some basic points that usually cause problems if overlooked.

Compatible Laravel version (Laravel 11, 12, and 13)

Laravel Breeze works perfectly in Laravel 11 and Laravel 12, although from Laravel 12 onwards it no longer appears as a direct option when creating the project. This is not a problem, it just changes the way it is installed.

Node.js, NPM, and Vite: the minimum necessary

This is where most people get stuck.

Breeze uses Vite, which implies that you need a modern version of Node.js. In real projects, I have seen constant errors due to using an old version of Node.

For example, if you see errors like:

it is not a Breeze problem, but an outdated Node version. Versions like v14.x are no longer sufficient. In my projects, I usually work with Node 18+, and with that, there are no problems.

Local environment (Laragon, Sail, or others)

You can use Breeze without problem in:

  • Laragon
  • XAMPP
  • Laravel Sail
  • Custom Docker

If you use Sail and do not have Node installed locally, you can also compile the assets from the container, as we will see later.

How to install Laravel Breeze step by step

Installing Breeze with Composer

To be able to install it:

From the root of your Laravel project, run:

$ composer require laravel/breeze --dev

This adds Breeze as a development dependency.

Running the Breeze installer

Then run:

$ php artisan breeze:install

It will ask which stack we want to use; if you have experience, you can select any of the technologies such as Vue or React:

Which Breeze stack would you like to install? Blade with Alpine ........................................ blade Livewire (Volt Class API) with Alpine ........................... livewire Livewire (Volt Functional API) with Alpine .................................... livewire-functional React with Inertia ......................................... react Vue with Inertia ................................................. vue API only .................................................. api

But, to start slowly, it is recommended that you use the "blade" option:

$ blade

You can enable dark mode:

Would you like to install dark mode support? (yes/no) [no]

Indicating "yes":

$ yes

Among other options, such as unit tests, which would not be necessary:

Would you prefer Pest tests instead of PHPUnit? (yes/no) [no]

Indicating "no":

$ no

And wait until the process finishes:

INFO  Installing and building Node dependencies.

Compiling assets and running the project

After installing Breeze, you need to compile the assets.

Run:

$ npm install $ npm run dev

This command:

  • Compiles Tailwind and JS
  • Generates the final files

Using npm with Laravel Sail

If you use Sail and do not have Node installed locally:

./vendor/bin/sail npm run dev

This means that changes you make to the code are automatically reflected in the browser.

Error handling with Node

If you see an error like the following:

failed to load config from C:\laragon\www\testlara11\vite.config.js

error when starting dev server:

Error: Cannot find module 'node:path' Require stack: - C:\laragon\www\testlara11\node_modules\vite\dist\node-cjs\publicUtils.cjs - C:\laragon\www\testlara11\node_modules\vite\index.cjs - C:\laragon\www\testlara11\vite.config.js

It means you have a very old version of Node; you can check your Node version with:

$ node -v

If you see a version similar to or lower than this:

v14.16.1

In the book, we are using:

$ node -v v18.8.0

You must update your version; then you can run:

$ npm run dev

In case you are using Laravel Sail and do not have Node installed on your computer:

$ ./vendor/bin/sail npm run dev

Finally, we will see that our route schema is overwritten in:

Route::get('/dashboard', function () { return view('dashboard'); })->middleware(['auth', 'verified'])->name('dashboard');

Configuring your routes

And remember to re-place the overwritten routes:

use App\Http\Controllers\Dashboard\CategoryController;
use App\Http\Controllers\Dashboard\PostController;
***
Route::group(['prefix' => 'dashboard'], function () {
    Route::resources([
        'post' => PostController::class,
        'category' => CategoryController::class,
    ]);
});

CSS and JavaScript Resources

If we check the generated files in the resources folder, we will see:

resources\css\app.css

@import 'tailwindcss/base';
@import 'tailwindcss/components';
@import 'tailwindcss/utilities';
resources\js\app.js
import './bootstrap';

import Alpine from 'alpinejs';

window.Alpine = Alpine;

Alpine.start();

Breeze configured Tailwind.css and Alpine.js in our project with the corresponding imports for that purpose.

Finally, the npm run dev command generates the output files and starts a process for Hot Reload Replacement that allows synchronizing the changes we make in the source code with what we are seeing in the browser.

What stack to choose when starting (Blade vs Vue vs React)

Although Breeze allows Blade, Vue, React, Livewire, and even API-only, for the first steps I always recommend Blade.

Blade allows you to:

  • Better understand the structure of Laravel
  • Avoid unnecessary complexity
  • Customize views without learning a full JS framework

If you already have experience, you can choose Vue or React without problem, but for learning, Blade is the most sensible option.

Authentication system

Video thumbnail

Apart from the Tailwind and Alpine configuration, Laravel Breeze configures a simple authentication schema that we are going to use below.

If we go to:

http://larafirststeps.test/login

We will see the following screen:

Login page in light mode
Login page in light mode

A login page, but we need to create a user:

http://larafirststeps.test/register

We create one:

Registration page in light mode
Registration page in light mode

And if we go to the database:

Create a user
Create a user

By default, we are already logged in; and as you can see, we already have a nice layout ready for our application; in the project:

Breeze Dashboard
Breeze Dashboard

You will see some view files that Laravel Breeze has already generated for us:

Layouts incorporated by Breeze
Layouts incorporated by Breeze

I recommend you give them a good look, and you will see all the options we have; register, login, recover password, and logout:

User options
User options
Video thumbnail

Breeze installer options explained

During the installation, you will see several questions.

  • Dark mode support
    • You can activate dark mode support. It is not mandatory, but it's nice to have and adds no real complexity.
  • Testing with Pest or PHPUnit
    • If you are starting, you don't need tests from the first moment. In many initial projects, I prefer to say “no” and add tests later when the flow is clear.
  • What each option actually generates
  • Breeze generates:
    • Routes
    • Controllers
    • Views
    • Blade components
    • Frontend configuration
  • None of this is “magic”. Everything remains in your project for you to modify.

Common errors when installing Laravel Breeze (and how to fix them)

  • Error “Cannot find module 'node:path'”
    • This error indicates an old Node version. Check your version:
    • node -v
  • If you see something like v14.x, update. In real projects, I work with versions like v18.x without problems.
  • Incompatible Node versions
    • Modern Laravel + Vite require modern Node. Updating Node solves 90% of initial errors.
  • Problems with Vite in Windows environments
    • In Windows, misconfigured routes or permissions can cause errors. They are usually fixed by:
      • Updating Node
      • Deleting node_modules
      • Running npm install again

What files and routes does Laravel Breeze create?

Once installed, Breeze modifies your project.

Authentication routes and auth middleware

Breeze creates routes for:

  • /login
  • /register
  • /forgot-password
  • /dashboard

And adds middleware like auth and verified.

Changes to the /dashboard route

An important detail: Breeze overwrites the /dashboard route. If you were already using it, you will have to re-insert your routes manually, something I usually do right after installing it.

What to do if Breeze overwrites existing routes

Always check routes/web.php after installation. It is a step that many skip and then don't understand why their dashboard “stopped working.”

Exploring the views and layouts that Breeze generates

  • Breeze generates views in resources/views.
    • Login, registration, and recovery views
  • All basic screens are ready to use and well-organized.
    • Main layout and Blade components
  • You will find reusable components that make it easy to customize buttons, inputs, and layouts without breaking anything.
  • User profile page
    • Includes a profile view where the user can update basic data. It is an excellent base for adding roles or permissions later.

Authentication system ready to use

With Breeze you can already:

  • Registration and Login
    • Register users and authenticate them without writing additional code.
  • Email verification
    • Included and easily activated.
  • Password recovery and change
    • Complete and functional flows from the first moment.

First recommended adjustments after installing Breeze

  • Review and customize the views
    • I recommend going through all the generated views. Understanding them now saves you many problems later.
  • Adjust styles with Tailwind CSS
    • The goal here is not to learn Tailwind in depth, but small changes greatly improve the visual experience.
  • Prepare the base for roles or permissions
    • Breeze does not include roles, but it leaves a perfect structure to add them without refactoring everything.

Is it worth using Laravel Breeze to start?

Real advantages over other options

  • Simplicity
  • Full control
  • Gentle learning curve
  • Clear and modifiable code
  • Limitations to keep in mind
    • Does not include advanced features like teams
    • Requires customization if the project grows a lot
  • My final recommendation based on the type of project
    • For first steps, learning, and small or medium real projects, Laravel Breeze is hard to beat.

Frequently asked questions about Laravel Breeze

  • Does Laravel Breeze work in Laravel 12?
    • Yes, it works perfectly, although it is installed manually.
  • Can I use Breeze just as a base and then delete things?
    • Yes, in fact, it is a common practice.
  • When should I switch to Jetstream?
    • When you need teams, 2FA, or other advanced features.
  • Is Breeze suitable for production projects?
    • Yes, as long as you adapt the security and configuration to the real environment.

Conclusion

Laravel Breeze is not just an “authentication package”. It is a clean and didactic way to start Laravel projects, understand their structure, and build on a solid base.

If you are taking your first steps, start simple, understand what you use, and grow from there. Breeze fits perfectly into that philosophy.

I agree to receive announcements of interest about this Blog.

Laravel Breeze is a minimal and simple implementation of all Laravel authentication features. We will learn how to set up a Laravel project with Laravel Breeze to create a simple authentication system and configure Tailwind.css and Alpine.js

| 👤 Andrés Cruz

🇪🇸 En español