2022-01-28 01:07:00

Getting Started with Laravel Breeze

Akmal Arzhang

Head of Cloud and Partnerships

With the Laravel 8, numerous improvements were seen and one of those important improvements were addition of packages like Breeze as a starter package, which is a quicker and easier to get started with rather than Jetstream that seemed overwhelming for many.

This article focuses on what, why and how of Laravel Breeze and reading this article will give you the confidence to work with Breeze in your next project.

First of All; What is Laravel Breeze?

Laravel Breeze is Laravel’s simple implementation of authentication features such as; login, registration, password reset, email verification and password confirmation. Which simply means; by running a command you will have all the authentication features managed and imported in your project. By default, it uses the Tailwind CSS for designing.

Now, you might be asking: What is Tailwind CSS?

Tailwind CSS is basically a utility-first CSS framework for rapidly building custom user interfaces. It is a highly customizable, low-level CSS framework that gives you all of the building blocks you need to build bespoke designs without any annoying opinionated styles you have to fight to override. Tailwind basically helps you design everything without even going to your CSS files and only by referencing specific classes. You can see Tailwind documentation here; https://tailwindcss.com/.

However, you are not ought to use the Tailwind CSS. You can use Bootstrap and or custom CSS. Just play with the blade templates that comes with the Breeze.

Why Laravel Breeze?

According to the documentation: Breeze provides a wonderful starting point for beginning a fresh Laravel application and is also great choice for projects that plan to take their Blade templates to the next level with Laravel Livewire and many more.

Laravel Breeze Installation

First things first, create your Laravel project. There are various ways to install a Laravel project, you can read more at: https://laravel.com/docs/8.x/installation. Personally; I prefer installing Laravel with Laravel Installer.

Open your terminal and go to your Xampp or project’s directory;

composer global require laravel/installer
laravel new example-app
cd example-app

Secondly, go to your .env file and setup your database login details.

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=YourPassword or Null

Now, we are ready to run the installation for Laravel Breeze at your project’s directory. In our case; example-app.

composer require laravel/breeze --dev
php artisan breeze:install
npm install
npm run dev
php artisan migrate

Run your project with;

php artisan serve

You are good to go. Laravel Breeze has taken care of scaffolding your project’s auth.

Navigate to your view folder to see the created pages. Access authentication routes at; routes/auth.php.

I hope this article was useful to you.


  • There is no comment yet

Full Name
Email
Write your comment