In this tutorial you will learn about the Laravel 9 Authentication with Breeze Tutorial Example and its application with practical example.
In this Laravel 9 Authentication with Breeze Tutorial Example I will show how to install and use breeze authentication in laravel 9 application. In this tutorial you will learn to install and use breeze authentication in laravel 9. In this example we will be using breeze auth to implement user authentication 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. The laravel 9 breeze auth create simple and lightweight authentication scaffolding.
Laravel 9 Authentication with Breeze Tutorial Example
In this step by step tutorial I will demonstrate you with example to implement user authentication using breeze authentication in laravel 9 application. Please follow instruction given below:
- Install Laravel 9
- Connecting App to Database
- Install breeze Auth Scaffolding
- Run PHP artisan Migrate
- Install Npm Packages
- Run Development Server
Install Laravel 9
First of all we need to create a fresh laravel project, download and install Laravel 9 using the below command
1 |
composer create-project --prefer-dist laravel/laravel LaravelAuth |
Connecting App to Database
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 name DB_USERNAME=db user name DB_PASSWORD=db password |
Install breeze Auth Scaffolding
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 php artisan Migrate
Now, run following command to migrate database schema.
1 |
php artisan migrate |
Install Npm Packages
Now run following command to install node js and npm dependencies:
1 |
npm install |
Then type the following command on cmd to run npm:
1 |
npm run dev |
Run Development Server
Now we are ready to run our example so lets start the development server using following artisan command –
1 |
php artisan serve |
Now, open the following URL in browser to see the output –
1 |
http://127.0.0.1:8000/ |