Laravel 9 Authentication with Breeze Pacakge Tutorial Example

Throughout laravel auth with breeze tutorial we will learn how to install Authentication scaffolding with laravel breeze pakage. Laravel Breeze’s default view layer is made up of simple Blade templates styled with Tailwind CSS.

Breeze provides a wonderful starting point for beginning a fresh Laravel application and is also great choice for projects that plan to take their Blade templates to the next level with Laravel Livewire.

Steps to follow Laravel 9 Authentication with Laravel Breeze

Laravel Breeze is a minimal, simple implementation of all of Laravel’s authentication features, including login, registration, password reset, email verification, and password confirmation.

  • Step 1: Create Laravel App
  • Step 2: Connect Database to App
  • Step 3: Install Laravel Breeze
  • Step 4: Install NPM Moduls
  • Step 5: Run Laravel App

Create Laravel App

First we need to create a new laravel application using the following command:

composer create-project laravel/laravel laravel-breeze-auth --prefer-dist

Go inside the app:

cd laravel-breeze-auth

Connect App to Database

In this step you have to make the database connection by adding database details in .env configuration file:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=

Install Laravel Breeze

This step guides you on how to install breeze auth scaffolding library in Laravel application:

composer require laravel/breeze --dev

Now install the breeze using the following command:

php artisan breeze:install

Now we need to run the migration for generating creating database;

php artisan migrate

Install NPM Modules

Now, you need to open the console again and run command to install npm modules:

npm install && npm run dev

Run Laravel application

Lastly, you have to start the laravel application using the following command:

php artisan serve

Now laravel auth with laravel breeze setup is ready, now open your browser and paste the url and test it.

http://127.0.0.1:8000

I hope you enjoy with this example;..

Leave a Comment