Laravel Livewire

Hope you’ve heard of Laravel Livewire. It is a creative web framework developed by Caleb Porzio. You can find many tutorial videos on Laracast about Livewire.

What is it?

The first sentence you’ll see on laravel-livewire.com is “Javascript is crazy these days”. Livewire tells developers to trust the backend. Laravel Livewire aims to provide a dynamic modern experience without having to worry about Reactive web frameworks and javascript. There will be big projects coming up in LiveWire in future.

What is it for?

It doesn’t use websockets. It relies on AJAX requests for server communication. It is in some ways a replacement for Vue.js, like in the cases where Vue sends ‘axios’ and ‘fetch’ requests. LiveWire has Alpine Js which is built for the need of JavaScript feature like drop-down, datepicker etc. It has APIs for the support of third-party library integration etc. If you are using Livewire you are effectively writing a PHP class which act as the backend of a frontend component. Also Writes a frond-end component in Laravel’s Blade. Write methods in your back-end component’s class that change the state of public fields. Livewire also instantiates the component in another view or component.