Make Your Laravel Apps
Reactive
Real-time UI updates from your controllers. No React. No Vue. No API layer. Just Laravel + Alpine.
composer require dancycodes/gale
What is Gale?
Gale is a Laravel package that lets you build reactive applications without leaving your Laravel workflow.
You write standard controllers. You return Blade views. But now your controllers can also push real-time updates to the browser—update Alpine state, swap out HTML fragments, trigger navigation, show validation messages—all from PHP.
When a user interacts with your page, their Alpine state is sent to your controller. You process it like any request, then use the gale() helper to send updates back. The page updates instantly without a full reload.
No JSON APIs to design. No frontend state management. No learning React or Vue. Just Laravel, Blade, and Alpine—now with server-driven reactivity.
How It Works
Standard Laravel controllers with a reactive response API
1<div x-data="{ count: 0 }">
2 <span x-text="count"></span>
3
4 <button @click="$postx('/counter/increment')">
5 +1
6 </button>
7</div>
<div x-data="{ count: 0 }">
<span x-text="count"></span>
<button @click="$postx('/counter/increment')">
+1
</button>
</div>
1public function increment()
2{
3 // Alpine state arrives in request
4 $count = request()->state('count', 0);
5
6 return gale()
7 ->state('count', $count + 1);
8}
public function increment()
{
// Alpine state arrives in request
$count = request()->state('count', 0);
return gale()
->state('count', $count + 1);
}
What You Can Do
All from your Laravel controllers
Update Alpine State
Change any Alpine variable from your controller. The frontend updates instantly without you writing JavaScript.
Swap HTML Fragments
Replace, append, or morph any part of the page. Render Blade partials and send them to specific elements.
Target Components
Update a cart total from a product controller. Name your Alpine components and update them from anywhere.
SPA-Style Navigation
Navigate without full reloads. Push to browser history from your controller or use links that fetch and swap content.
Stream Long Operations
Processing a CSV? Importing users? Send progress updates in real-time as your job runs.
Stay in Laravel
No new concepts to learn. Controllers, Blade, validation, routing—it's all the same, just reactive now.
Ready to Get Started?
Install Gale in minutes and start building reactive Laravel applications today.