Laravel Livewire v1.0 Out

Livewire is the full-stack framework for Laravel, which makes it easy to create dynamic interfaces for Laravel.

This release adds:

  • Turbolink integration
  • Alpine JS integration
  • Wire support: Listening to model for "login" events sent by AlpineJS: $dispatch ('input', 'foo')
  • wire:custom-event="foo"Getting params from an AlpineJS : $dispatch('custom-event', 'bar'). (In public function foo($param)$param Will 'bar')
  • Livewire custom tag syntax (similar to Laravel 7 Blade component tag syntax) (available only in Laravel 7):

If you don't know about Livewire, there's a documentation on the homepage that shows you what it's doing:

  • Livewire creates the first component output with the page (including Blade), making it SEO-friendly.
  • When an interaction occurs, Livewire makes an AJAX request to the server with updated data.
  • The server rebuilds the component and responds with new HTML.
  • Livewire then changes dom wisely based on what changes.

You can check out the quickstart documentation to help you create your first component. Here's a Livewire component from the Quickstart guide

use Livewire\Component;class Counter extends Component
{
public $count = 0;
public function increment()
{
$this->count++;
}
public function decrement()
{
$this->count--;
}
public function render()
{
return view('livewire.counter');
}
}

With the accompanying Blade template:



{{ $count }}



You can get upgrade instructions and details about the version from Version v1.0.0 on GitHub.

  Quote

KARABAY A, 2020 . Laravel Livewire v1.0 Released,

https://www.karabayyazilim.com/blog/php/framework/laravel/laravel-livewire-v10-cikti-2020-02-27-224849

(Accessed February 27, 2020).


  Share this post

Comments (1)

  • ANSWER ONUR

    Hello, thank you for the information, do you actively use livewire?

    11 months ago

    Comment

    Subscribe
    Sign up for the email newsletter to be the first to know about my blog posts