laravel 8 authentication with breeze

In this tutorial you will see how to install Laravel Authentication with Laravel Breeze package. Laravel Breeze is a minimal, simple authentication scaffolding . it come with with by default Blade components , Tailwind CSS and Alpine Js. when you should use Laravel Breeze if you are planning to create project with Tailwind CSS Front-end or Back-end then it is good choice for you.when you should not use Laravel Breeze if you are not comfortable with Tailwind CSS ,Alpine js then you can use Laravel UI Package, link blow you can check.


Note: Laravel 8 Authentication with Laravel UI

Laravel Breeze Authentication features is login, registration, password reset, email verification, and password confirmation etc


Laravel 8 Authentication with Breeze


Step 1: Set Up Laravel Project

Step 2: Set Up Database Details in ENV

Step 3: Install Laravel breeze

Step 4: Run npm install && npm run dev command

Step 5: Migrate your database


Step 1: Set Up Laravel Project

Installing a fresh new laravel application, so head over to the terminal, type the command, and create a new laravel app.

composer create-project --prefer-dist laravel/laravel larainfo

Step 2: Set Up Database Details in ENV

Now, you have to connect the laravel app to the database, hence open the .env configuration file and add the database credentials as suggested below.

.env

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=database_name
DB_USERNAME=database_user_name
DB_PASSWORD=database_password

Step 3: Install Laravel breeze

Next, you need to run below command in your terminal

composer require laravel/breeze --dev

After you need to install breeze

php artisan breeze:install

After install you got message like .

 /Laravel/larainfo php artisan breeze:install                 
Breeze scaffolding installed successfully.
Please execute the "npm install && npm run dev" command to build your assets.

Step 4: Run npm install && npm run dev command

you need to install first node npm if you do not have node npm package then install first other wise Laravel mix not working .

npm install && npm run dev

run this command and wait unit laravel mix complete

             
  Laravel Mix v6.0.19  
             

 Compiled Successfully in 8702ms
┌────────────────────────────────────────────────────────────────────────────────────────────────────────────┬──────────┐
                                                    File  Size   
├────────────────────────────────────────────────────────────────────────────────────────────────────────────┼──────────┤
                                                 /js/app.js  673 KiB 
                                                css/app.css  3.82 MiB 
└────────────────────────────────────────────────────────────────────────────────────────────────────────────┴──────────┘

Step 5: Migrate your database

Next,run this command

php artisan migrate

Now our Laravel 8 authentication system is ready. you can run serve

php artisan serve

you can go register page it look like this.


Read also

Note: Laravel 8 Authentication with Laravel UI