DEV Community

Cover image for Laravel Breeze Quick Setup
larawell-done
larawell-done

Posted on

1

Laravel Breeze Quick Setup

Laravel Breeze is a minimalist starter kit for building Laravel-based web applications. It provides a simple authentication system, basic UI components, and a few pre-built routes and views to help developers get started quickly. In this blog post, we will guide you through the steps to install Laravel Breeze in your Laravel application.

Step 1: Create a new Laravel application

First, you need to create a new Laravel application using the Composer command. Open your terminal and navigate to the directory where you want to create your new Laravel application. Then, run the following command:

composer create-project --prefer-dist laravel/laravel <project-name>
Enter fullscreen mode Exit fullscreen mode

Replace <project-name> with the name of your project. This command will download the latest version of Laravel and create a new Laravel application in the specified directory.

Step 2: Install Laravel Breeze

Once you have created your Laravel application, you can install Laravel Breeze using Composer. In your terminal, navigate to the root directory of your Laravel application and run the following command:

composer require laravel/breeze --dev
Enter fullscreen mode Exit fullscreen mode

This command will install Laravel Breeze as a development dependency.

Step 3: Generate authentication scaffolding

Next, you need to generate the authentication scaffolding using the following command:

php artisan breeze:install
Enter fullscreen mode Exit fullscreen mode

This command will generate the basic authentication routes, views, and controllers needed for user registration, login, and password reset. If asked select the stack(blade|react|vue|api) that you want to install, It will also install the necessary NPM packages for the authentication UI components.

Step 4: Run migrations

The authentication scaffolding includes a users table, so you need to run the database migrations to create this table. Run the following command to run the migrations:

php artisan migrate
Enter fullscreen mode Exit fullscreen mode

Step 5: Compile assets

Once the authentication scaffolding has been generated, you need to compile the assets using the following command:

npm install && npm run dev
Enter fullscreen mode Exit fullscreen mode

This command will install the required NPM packages and compile the assets.

Step 6: Test the authentication system

That's it! You have now installed Laravel Breeze and generated the basic authentication scaffolding. With your application server up and running(php artisan serve) you can test the authentication system by navigating to the /register and /login routes in your application.

register

Conclusion, Laravel Breeze is a great starting point for building Laravel-based web applications that require basic authentication features. With just a few simple steps, you can quickly set up an authentication system and get started with your application development.

Image of Docusign

Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay