In this tutorial you will see how to install Authentication with laravel breeze pakage. Laravel Breeze is a minimal, simple implementation of all of Laravel's authentication features, including login, registration, password reset, email verification, and password confirmation. Laravel Breeze's default view layer is made up of simple Blade templates styled with Tailwind CSS.
Laravel 9 Authentication with Laravel Breeze
Step 1: Set Up Laravel Project
Step 2: Set Up Database Details in ENV
Step 3: Install Breeze
Step 4: Step up Auth Scaffolding
Step 5: Run npm install && npm run dev command
Step 6: Migrate your database
Step 1: Set Up Laravel Project
Installing a fresh new laravel 9 application, so head over to the terminal, type the command, and create a new laravel app.
composer create-project laravel/laravel project-name
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 install laravel breeze via composer.
composer require laravel/breeze --dev
Step 4: Step up Auth Scaffolding
Chose anyone one for you requirements.
1) for simple authentication to run below command.
php artisan breeze:install
2) Breeze & Inertia
if you want to start your single page application. you can chose laravel breeze with inertia
php artisan breeze:install vue
// Or...
php artisan breeze:install react
npm install
npm run dev
php artisan migrate
3) Breeze & Next.js / API
If you want create seo app then you can go with laravel breeze nextjs api.
php artisan breeze:install api
php artisan migrate
You can also read below article setup with laravel breeze api with next.
Laravel Breeze API Install & Setup Authentication with Next.js
Step 5: 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
Step 6: Migrate your database
Next,run this command
php artisan migrate
Now our Laravel 9 authentication system is ready. you can run serve
php artisan serve
For more details or any new change you can read official laravel doc
Read Also
Laravel 9 Add Simple Sidebar with Tailwind CSS Example
How to Use Carousel Slider in Laravel 9 Example
Laravel 9 Posts with Tags Many to Many Relationships Example
Laravel 9 Insert Category in Posts CRUD Example
How to Use Ckeditor 5 in Laravel 9 Vite with Tailwind CSS
Laravel 9 Simple Image Upload in Ckeditor 5 Example
Laravel 9 Flash Message Timeout and Hide Message Example
Install & Setup Markdown Editor in Laravel 9
Nuxt 3 Data Fetching Using Laravel 9 Api Example
Laravel 9 Image Upload with Preview using Tailwind CSS & Alpine JS
Laravel 9 with Tailwind CSS Form Validation Example
Laravel 9 Backend Api Connect with Vue 3 Using Axios Example
Laravel 9 Authentication with Next js Example
Laravel 9 Sanctum Authentication with Nuxt JS Example
Laravel 9 Simple Search with Pagination Example
Laravel 9 Install Setup TALL(Tailwind, Alpinejs, Livewire) Admin Panel
How to Fix and Clean Code Style in laravel 9
Laravel 9 Image File Upload Example
3 Way to Create Slug in Laravel 9 without Package
How to Add Dark Mode in Laravel 9 with Tailwind CSS