The pitch

What is currently painful or complicated about web development, and how can we compress it into a single line of code?

That question has guided Livewire since day one.

Consider the most basic interaction in your app: a user presses a button, and something happens on the server.

In Livewire, it looks like this:

<?php
 
new class extends Component
{
public function doSomething() {
// ...
}
}; ?>
 
<button wire:click="doSomething">...</button>

That is all the code required to give your users a button that talks to the server.

Nothing else.

Every bit of server/client ceremony that can be removed has been removed:

  • No API endpoint to design
  • No schema to adhere to
  • No REST vs GraphQL debate
  • No fetch request to write
  • No loading state to track
  • No flaky or missing error handling
  • No annoying build pipeline to update
  • No ceremony for a dang button

Just a button wired up to a method.

That small example is the whole philosophy.

Livewire exists to collapse the distance between what your users do and how your application responds.

One codebase

Write Laravel. Everywhere.

Livewire unlocks Laravel across your entire stack.

This means access to things like localization, authorization rules, validation logic, and application utilities directly inside your user interfaces.

Consider the following template:

@guest
<a href="{{ route('signup') }}">Sign up</a>
<a href="{{ route('login') }}">Log in</a>
@endguest
 
@auth
<h1>Welcome back {{ Auth::user()->name }}!</h1>
 
<span>You have {{ $i = Auth::user()->unreadNotifications->count() }} new {{ Str::plural('message', $i) }}</span>
@endauth

Laravel is full of convenient little utilities like these. It's so nice being able to use them directly in your templates instead of duplicating logic or preparing heaps of pre-formatted data to send down to the client.

It's genuinely hard to overstate the benefit of collapsing two codebases into one.

Forms & tables

Proudly pragmatic

Let's face it: most applications are essentially a collection of forms and tables.

Therefore, we're laser-focused on giving you the best and most useful APIs for exactly those things.

You could spend an entire career mastering the intricacies of useEffect or reactive Signals in JavaScript. Or, you could spend that time building and shipping applications to real people in the real world.

Consider the following example: a search input that filters through database records and tracks the search value in the URL's query string.

<?php
 
new class extends Component {
#[Url]
public $search = '';
 
public function posts()
{
return Post::whereFullText('title', $this->search)->get();
}
}; ?>
 
<dialog>
<input type="text" wire:model.live="search">
 
<ul>
@foreach($this->posts as $post)
<li>{{ $post->title }}</li>
@endforeach
</ul>
</dialog>

Every line of code in this example is doing heavy lifting.

Something as small as wire:model.live quietly handles a ton of work for you:

  • Debounces/throttles as you type
  • Cancels stale requests
  • Keeps out-of-order responses from stomping newer results
  • Tracks loading states with a simple data-loading attribute

And some interactions should never touch the server: toggling a dropdown, a keyboard shortcut, a drag handle. For those, Alpine.js is built right in. Instant, client-side, no round-trip.

Livewire is leverage for the Laravel you already know.

Less to get wrong

Accidentally agentic

Everything that makes Livewire good for humans makes it even better for agents because Livewire shrinks the surface area of code an LLM has to get right.

Take the search input you just saw. To build it in a typical SPA stack, an agent has to nail a fetch call, a loading state, a debounce timer, a race-condition guard, and error handling. Every one is a chance to hallucinate.

In Livewire, it has to get one attribute right: wire:model.live="search".

The gritty JS details are all packaged inside the framework, built and maintained by us. Your agent doesn't have to generate any of that. It just reaches for the right attribute here and the right directive there.

Less code means fewer chances to get it wrong.

PHP Laravel Livewire

A lineage of leverage.

PHP didn't win the web by being the most elegant language. It won by giving developers the most leverage with the least ceremony.

Laravel made the same bet. So does Livewire.

I dare you to try it. You won't believe how productive you can be 🔥.

- Caleb

Stop fighting
Start shipping

Read the docs, write a component, see what one file can do.