What is Laravel Breeze & how to install it in the Laravel application?

vinoy · · 6232 Views

Laravel Breeze is a shiny new package released by Taylor and the Laravel team.

Breeze provides a minimal and simple starting point for building a Laravel application with authentication. Styled with Tailwind, Breeze publishes authentication controllers and views to your application that can be easily customized based on your own application’s needs. 

At the point when Laravel 8 released, It accompanied many new features and improvements. However, alongside it, the Laravel team has released Jetstream for application scaffolding, which accompanies all the fancy odds and ends in-built, for example, login, registration, email verification, two-factor authentication, session management, and optional team management.

It's nice that the framework itself gives every all these features out-of-the-box. But many developers didn’t like this at all and criticized the Laravel team a lot for it. People didn’t like it maybe because, under the hood, Jetstream enforced the use of Livewire or Inertia for scaffolding, and developers didn’t want to learn a new framework/stack to try out Laravel 8.

There was a developing need to have something truly easy that just works. Laravel team reacted to all the criticism, and afterward, thus Laravel Breeze introduced!

Installing Breeze

First, create a new Laravel app:

laravel new my-app

cd my-app

Then require Breeze as development dependency:

composer require laravel/breeze --dev

After installing the breeze package, run the following command to install authentication scaffolding:

php artisan breeze:install

This command will publish all authentication-related views, controllers, request file, route file.

Install node dependecy

npm install && npm run dev

When done, migrate the database by running php artisan migrate which will create essential tables for authentication, for example, users, password_resets, etc in the application's database.

Running Breeze Application

We are done! Our installation is finished. Now we can register a new user and login to our Laravel application.

0

Please login or create new account to add your comment.

0 comments
You may also like:

Laravel Facades: Simplifying Code and Improve Readability

As an integral part of Laravel, a renowned PHP framework, Facades provide a static interface to classes stored in the application's service container. They serve as static proxies (...)
Harish Kumar

What is Laravel’s Service Container and How to Use Dependency Injection in Laravel App

Dependency injection and inversion of control are vital in clean web development. They make writing maintainable, testable code possible. Laravel is a famous PHP framework that (...)
Harish Kumar

Secure Your SPA with Laravel Sanctum: A Step-by-Step Guide

In today's web development landscape, Single Page Applications (SPAs) are increasingly popular. But securing their interaction with backend APIs is crucial. Laravel Sanctum provides (...)
Harish Kumar

Multi-Authentication with Guards in Laravel

Laravel's robust authentication system provides a powerful mechanism for securing your application. To cater to scenarios where you need different user roles with distinct login (...)
Harish Kumar

Laravel Pint & VS Code: Automate Your Code Formatting

Laravel Pint is an opinionated PHP code style fixer built on top of PHP-CS-Fixer, designed to simplify the process of ensuring clean and consistent code style in Laravel projects. (...)
Harish Kumar

Laravel Clockwork: A Deep Dive into Debugging, Profiling Skills and Best Practices

In the world of web development, building complex applications often comes with the challenge of identifying and resolving performance bottlenecks. This is where a reliable debugging (...)
Harish Kumar