Laravel 10 Breeze Authentication Example
In this tutorial we will learn how to create a laravel 10 project using the breeze package. Laravel Breeze is a minimalist authentication scaffolding package for Laravel 10. It publishes controllers files, views and routes for authentication system in laravel 10 application. It provides a simple and secure foundation for user login, registration, password reset, email verification, and profile editing, all with beautiful Blade templates and optional Tailwind CSS styling.
Prior to the introduction of Laravel Breeze in Laravel, the laravel/ui package was the go-to option for developers seeking out-of-the-box authentication scaffolding. Offering both Bootstrap and React implementations, it provided pre-built components for login, registration, password reset, and email verification. However, due to its broader scope and additional features, laravel/ui came with a bit more setup complexity than the streamlined minimalism of Breeze.
Step 1: Install the Laravel project
First open the window terminal and Install a new laravel application using the below command.
composer create-project laravel/laravel example-app
Step 2 : Move to the project directory
cd example-app
Step 3: Add breeze package to Laravel
composer require laravel/breeze
Step 4 : Install laravel breeze for simple auth scaffolding. So let's run the command below.
php artisan breeze:install
Now you will get the below option to choose.
Which Breeze stack would you like to install? Blade with Alpine ................................................................................... blade Livewire (Volt Class API) with Alpine ............................................................ livewire Livewire (Volt Functional API) with Alpine ............................................ livewire-functional React with Inertia .................................................................................. react Vue with Inertia ...................................................................................... vue API only .............................................................................................. api
Choose the first option (Blade with Alpine) by entering blade in command prompt and pass other options as per your requirement.
Step 5 : Create a database in MySQL and add database name in .env file and run below migration command in your terminal.
php artisan migrate
Step 6 : Now you can run the php artisan serve command to start the development server and visit to http://localhost:8000/ URL.
php artisan serve
If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.
Don't forget to share this article! Help us spread the word by clicking the share button below.
We appreciate your support and are committed to providing you valuable and informative content.
We are thankful for your never ending support.
Random Code Snippet Queries: Laravel
- How to validate URL with https using regex in laravel
- Send OTP using textlocal api in laravel
- SQLSTATE[42000]: Syntax error or access violation: 1055
- How to get only time from created_at in laravel
- How to pass query string with pagination in laravel
- How to check column value of a record is null or not in laravel
- Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.0"
- Credit card validation in laravel
- How to pass variable from controller to model in Laravel
- Update if exist else insert new record in laravel
- Get domain name in laravel
- Remove several global scope from query
- How to fetch single row data from database in laravel
- Create project table with model and migration
- Call to undefined relationship [user] on model [App\Models\Post]
- How to upload multiple images after preview in laravel using cropper js
- How to generate .env file for laravel?
- Laravel delete all rows older than 30 days
- How to get user information using hootlex/laravel-friendships package in laravel
- How to display validation error in laravel
- Pass value from controller to model in laravel
- Get the post details if it has at least one comment in comments table
- Session Doesn't Work on Redirect
- How to create belongstomany relation using custom name on custom pivot table
- Sample configuration files to create laravel project with docker using wsl (window subsystem linux)