
Laravel Breeze is a minimal and easy-to-install authentication package that provides essential features for user authentication, including Login, registration, reset password, email verification, and password confirmation.
Here's a step-by-step guide to installing and setting up Laravel Breeze in a Laravel.
Step 1: Create a New Laravel Application :
If you haven't created a Laravel project yet, begin by running the command below.
composer create-project laravel/laravel laravel-breeze
cd laravel-breeze
Step 2: Install Laravel Breeze
To install Breeze, use the following Composer command:
composer require laravel/breeze --dev
This installs Breeze as a development dependency, as it's mainly used for setting up authentication during development.
Step 3: Run the Breeze Installer
After installing the Breeze package, run the Breeze installation command:
php artisan breeze:install
Installation Questions:
During the installation, Breeze will prompt you with a few configuration questions to customize the setup:
- Which Breeze stack would you like to install?
Enter blade or select an alternative, such as reat or vue , if you're using a frontend framework. Here we'll use blade - Would you like dark mode support?
Enter Yes or no depending on whether you want a dark mode option. - Which testing framework do you prefer?
Breeze supports PHPUnit by default. if you prefer a different framework, you can specify it here.
Step 4: Migrate the Database
Breeze includes default migrations for use tables. If you haven't already migrated your database, run the following command:
php artisan migrate
Step 5: Install and Build Frontend Assets
Breeze includes basic frontend assets to handle the user interface for authentication. To install and compile run the below command:
npm install
npm run dev
Step 6: Run the Application
Now, start the Laravel development server:
php artisan serve
Summary of Commands
Here is a quick recap of the commands used for setting up Breeze:
composer require laravel/breeze --dev
php artisan breeze:install
php artisan migrate
npm install
npm run dev
php artisan serve
Thanks for reading
* Please Don't Spam Here. All the Comments are Reviewed by Admin.