Blog Detail

23

Aug
Laravel  Breeze - A Minimal Authentication Scaffolding cover image

arrow_back Laravel Breeze - A Minimal Authentication Scaffolding

Taylor Otwell has released a simple and easy-to-use authentication package called Laravel Breeze. It provides the minimal and Straightforward implementation of all of Laravel’s authentication features, which includes 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. Breeze offers an amazing starting point for creating a brand-new Laravel application. It has the following features:

  • Easy and lightweight package.
  • Powered by Blade and Tailwind CSS.
  • Neat layout and dashboard design.
  • Straightforward customization auth-related stubs.
  • Easy auth route management.
  • It is maintained by the Laravel team.

Requirements

  • PHP >= 7.3 or >= 8.0
  • illuminate/filesystem >= 8.0
  • illuminate/support >= 8.0

Installation

First, you should create a new Laravel application by running this command.

composer create-project laravel/laravel laravel-breeze 8.0

Next, you’ve configure your database, and run your database migrations:

php artisan migrate

Install Laravel Breeze

composer require laravel/breeze --dev

After installing the Laravel Breeze package, you can run this command:

php artisan breeze:install

This command publishes the authentication views, routes, controllers, and other resources to your application. Laravel Breeze publishes all of its code to your application so that you have full control and visibility over its features and implementation. After the installation of Breeze, you should also compile your assets so that your application’s CSS file is available.

So next, you’ve to install npm:

npm install
npm run dev

After that, run this command:

php artisan migrate

Next, you can navigate to your application’s /login or /register URLs in your web browser. In the routes directory, a file named auth.php contains all authentication-related routes. You can easily disable those routes which are not necessary for your project.

Laravel Breeze & Inertia

Laravel Breeze also allows an Inertia.js frontend implementation powered by Vue or React. So you can effortlessly utilize Inertia Js with Laravel Breeze. To utilize an Inertia stack, specify vue or react as your desired stack when executing the breeze:install Artisan command:

php artisan breeze:install vue

// Or...

php artisan breeze:install react

Next, you’ve to run these commands:

npm install
npm run dev
php artisan migrate

Closing Notes

Here is a quick start to Laravel Breeze. I hope, that you can easily install the Laravel Breeze in your project by following these steps.

Published at : 23-08-2021

Author : Rizwan Aslam
AUTHOR
Rizwan Aslam

I am a highly results-driven professional with 12+ years of collective experience in the grounds of web application development especially in laravel, native android application development in java, and desktop application development in the dot net framework. Now managing a team of expert developers at Codebrisk.

Launch your project

Launch project