how to use livewire 3 in laravel 10 using laravel breeze

In this tutorial you will see how to install livewire 3 in Laravel 10 by using laravel breeze package.


Step 1: Set Up Laravel Project

Installing a fresh new laravel application, so head over to the terminal, type the command, and create a new laravel app.

composer create-project laravel/laravel breeze-livewire

Now, you have to connect the laravel app to the database, hence open the .env configuration file and add the database credentials as suggested below.

.env

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=database_name
DB_USERNAME=database_user_name
DB_PASSWORD=database_password


Step 2: Install Laravel Breeze

Install laravel breeze via composer in laravel 10.

composer require laravel/breeze --dev


Step 3: Step up Laravel Breeze with Livewire

Run below command to install breeze and livewire 3

php artisan breeze:install


 Which Breeze stack would you like to install?
 Blade with Alpine ..................................... blade  
 Livewire with Alpine .................................. livewire  
 React with Inertia .................................... react  
 Vue with Inertia ...................................... vue  
 API only .............................................. api  
❯ livewire
livewire breeze

livewire breeze

Step 4: Run the Server

php artisan serve