Installing Laravel Breeze a starter kitLaravel Breeze is a lightweight starter kit for Laravel that provides authentication, registration, email verification, and password reset features out of the box. It uses Laravel's built-in authentication features and provides a clean, minimalistic starter template for your project. In this tutorial, we'll go through the steps to install Laravel Breeze in your Laravel project.
PrerequisitesBefore we start, make sure you have the following:
- A Laravel project (version 8.x or higher)
- Composer installed on your system
laravel new your-project-name
Step 1: Install Laravel BreezeTo install Laravel Breeze, open your terminal and navigate to your project directory. Then, run the following command:
This will install Laravel Breeze and its dependencies in your project. The --dev flag is optional and indicates that Laravel Breeze is only needed for development purposes.
composer require laravel/breeze --dev
Step 2: Run Breeze InstallerOnce Laravel Breeze is installed, you can run the installer to add authentication to your Laravel project. Run the following command in your terminal:
This command will create the necessary authentication views, routes, and controllers in your Laravel project.
php artisan breeze:install
Step 3: Run Database MigrationsBefore we can use authentication in our Laravel project, we need to run the database migrations. Run the following command in your terminal:
This will create the necessary tables in your database for authentication to work.
php artisan migrate
Step 4: Build Frontend AssetsLaravel Breeze uses Tailwind CSS for its frontend styling. To build the frontend assets, run the following command in your terminal:
This will install the necessary Node.js packages and build the frontend assets for your Laravel project.
npm install && npm run dev