In this tutorial you will learn about the Create Authentication Scaffolding in Laravel 8 with Breeze and its application with practical example.
In this Create Authentication Scaffolding in Laravel 8 with Breeze tutorial I will show how to create authentication scaffolding in laravel 8 application using breeze. In this tutorial you will learn to install and use breeze authentication to generate authentication scaffolding in laravel 8. In this example we will be using breeze authentication to implement user authentication scaffolding in laravel application. The breeze auth will be used to create login, register, reset the password, forget password, email verification, and two-factor authentication blade views and controller file.
Create Authentication Scaffolding in Laravel 8 with Breeze
Here are the list of auth pages or controller you can create with Laravel breeze:
- Login/Sign-in
- Register/Sing-up
- Logout/Sign-out
- Forget password
- Reset password
- Email verification
- Two-factor authentication
- Profile
Laravel Breeze Package Integration Example
In this step by step tutorial I will demonstrate you with example to implement user authentication scaffolding using breeze authentication in laravel 8 application. Please follow instruction given below:
- Create Laravel 8 project
- Add Database in Laravel
- Install breeze scaffolding library
- Run migration
- Install Required NPM modules
- Run Laravel application
Create Laravel project
First of all we need to create a fresh laravel project, download and install Laravel 8 using the below command
1 |
composer create-project laravel/laravel laravel-breeze-auth-example --prefer-dist |
Add Database in Laravel
Now, lets create a MySQL database and connect it with laravel application. After creating database we need to set database credential in application’s .env file.
1 2 3 4 5 6 |
DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=db DB_USERNAME=root DB_PASSWORD= |
Install Breeze Scaffolding Plugin
In this step, we will install breeze auth Package via the composer dependency manager. Use the following command to install breeze auth Package.
1 |
composer require laravel/breeze --dev |
Now you have to install laravel breeze for simple auth scaffolding. so let’s run bellow command:
1 |
php artisan breeze:install |
Run Migration in Laravel
Now, run the migration to create database table using following artisan command:
1 |
php artisan migrate |
Install Required NPM Modules
Now run following command to install node js and npm dependencies:
1 |
npm install |
Then type the following command on cmd to run npm: