livue/livue
Server-driven reactivity for Laravel using Vue.js
composer require livue/livue
Documentation
LiVue
Server-driven reactivity for Laravel using Vue.js.
Write reactive components with PHP on the server and Vue.js on the client, combining the best of both worlds.
Requirements
| Requirement | Version |
|---|---|
| PHP | 8.2+ |
| Laravel | 11.x / 12.x |
| Vue | 3.5+ |
Installation
composer require livue/livue
Quick Start
// app/LiVue/Counter.php
namespace App\LiVue;
use LiVue\Component;
class Counter extends Component
{
public int $count = 0;
public function increment(): void
{
$this->count++;
}
public function render(): string
{
return 'livue.counter';
}
}
<!-- resources/views/livue/counter.blade.php -->
<div>
<span>{{ $count }}</span>
<button @click="increment">+</button>
</div>
<!-- In any Blade view -->
<livue:counter />
Documentation
For full documentation, visit livue-laravel.com/docs.
Changelog
See CHANGELOG.md for release history.
Upgrading
See UPGRADE.md for upgrade instructions.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover a security vulnerability, please see SECURITY for reporting instructions.
Credits
LiVue is heavily inspired by Livewire. A huge thank you to Caleb Porzio and the Livewire team for creating such an amazing tool that inspired this project.
License
LiVue is open-sourced software licensed under the MIT license.
Please sign in to write a review