Hello artisan, Today I am going to show you laravel Authentication with breeze. In this example, we will learn the laravel authentication system with Breeze. Laravel makes it very efficient and easir to the developers.
Read also Laravel 8.0 Auth with Inertia JS Jetstream Example
Create Laravel Project
Firstly create brand new laravel app for use breeze Auth Scaffolding.If you have already a authentication system then it may not work.
composer create-project --prefer-dist laravel/laravel blog
Make Database Connection
Go to your project directory and find .env file and update it like :
.env
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel_auth8
DB_USERNAME=root
DB_PASSWORD=
Install breeze Auth Scaffolding
install auth scaffolding breeze package in laravel app by using the following command
composer require laravel/breeze --dev
Next you have to install laravel breeze for simple auth scaffolding. so let’s run bellow command
php artisan breeze:install
Run php artisan Migrate
open terminal and type the following command on it to create database table
php artisan migrate
Install Npm Packages
npm install
Run npm Packages
npm run dev
Run Development Server
php artisan serve
Go to the browser and enter the following url
http://127.0.0.1:8000/
http://127.0.0.1:8000/register
http://127.0.0.1:8000/login
Hope it will help!