How to install Laravel Breeze

"Learn how to quickly set up Laravel Breeze with a simple example."

Installing Laravel Breeze

Laravel Breeze is a simple, minimal UI designed to make scaffolding authentication breeze. It's a great starting point for any Laravel project that needs authentication.

To install Laravel Breeze in your project, you'll need to use the composer command to install the package. Open up your terminal and enter the command below:

composer require laravel/breeze --dev

This will install the Laravel Breeze package and its dependencies in your project. Once it's done, you need to register the package's service provider. To do this, open config/app.php and add the following line to the providers array:


Next, you need to publish the assets and configuration files. Run the command below to do that:

php artisan breeze:install

This will generate two files: breeze.php in the config directory and views/auth containing the authentication views. You can customize these files as needed.

Finally, you need to register the authentication routes. To do this, open routes/web.php and add the following line:


That's it! You've successfully installed Laravel Breeze in your project. Now you can scaffold authentication quickly and easily.

Answers (0)