How to Install Laravel Livewire?

How to Install Laravel Livewire?

Posted on:April 6, 2020 at 10:00 AM

Hello

Today, I will show you how to install laravel livewire. Before that, if you are not familiar with Livewire, here is about what exactly the laravel livewire.

Livewire is a full-stack framework for Laravel that makes building dynamic interfaces simple, without leaving the comfort of Laravel.

Besides, you can check it out in the official site and feel free to share your thought to the official forum.

Let’s get started.

Table of Contents

Open Table of Contents

What’s required

How to Install.

To install livewire to Laravel project, you need to run the following command in the terminal.

composer require livewire/livewire

Once you install livewire successfully, then you need to include livewire to your file.

Setting Up

I assume that you have a fresh laravel project where you have installed livewire.

Now, go to resources/views/welcome.blade.php file and follow the instructions-

  • Add @livewireStyles inside your <head> tag
  • Add @livewireScripts directive before close your </body tag.

Done, easy enough, right?

Making your first component with Laravel Livewire