Laravel 9 Authentication with Breeze Tutorial Example

Laravel 9 breeze auth scaffolding; In this tutorial, we will learn how to build a login, register, logout, forget password, profile, and reset password page by using breeze auth scaffolding in laravel 9 apps.

Laravel 9 breeze auth is simple and lightweight scaffolding. And Laravel 9 breeze auth app will look like in the following image:

Home/Welcome Page

Laravel 9 Breeze Auth Example Tutorial

Use the following steps to implement breeze auth in laravel 9 apps:

  • Step 1 – Install Laravel 9 App
  • Step 2 – Connecting App to Database
  • Step 3 – Install breeze Auth Scaffolding
  • Step 4 – Run PHP artisan Migrate
  • Step 5 – Install Npm Packages
  • Step 6 – Run Development Server

Step 1 – Install Laravel 9 App

In step 1, open your terminal and navigate to your local webserver directory using the following command:

//for windows user
cd xampp/htdocs

//for ubuntu user
cd var/www/html

Then install laravel 9 latest application using the following command:

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

Step 2 – Connecting App to Database

In step 2, open your downloaded laravel app into any text editor. Then find .env file and configure database detail like the following:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=db name
DB_USERNAME=db user name
DB_PASSWORD=db password

Step 3 – Install breeze Auth Scaffolding

In step 3, 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

Step 4 – Run php artisan Migrate

In step 4, open the terminal and type the following command on it to create a database table:

php artisan migrate

Step 5 – Install Npm Packages

In step 5, open again command prompt and type the following command to install node js:

npm install

Then type the following command on cmd to run npm:

npm run dev

Step 6 – Run Development Server

In step 6, use the following command to start the development server:

php artisan serve

Now, open the browser and hit the following URL on it:

http://127.0.0.1:8000/

Recommended Laravel Tutorials

AuthorDevendra Dode

Greetings, I'm Devendra Dode, a full-stack developer, entrepreneur, and the proud owner of Tutsmake.com. My passion lies in crafting informative tutorials and offering valuable tips to assist fellow developers on their coding journey. Within my content, I cover a spectrum of technologies, including PHP, Python, JavaScript, jQuery, Laravel, Livewire, CodeIgniter, Node.js, Express.js, Vue.js, Angular.js, React.js, MySQL, MongoDB, REST APIs, Windows, XAMPP, Linux, Ubuntu, Amazon AWS, Composer, SEO, WordPress, SSL, and Bootstrap. Whether you're starting out or looking for advanced examples, I provide step-by-step guides and practical demonstrations to make your learning experience seamless. Let's explore the diverse realms of coding together.

Leave a Reply

Your email address will not be published. Required fields are marked *