Fusion
Unite your modern frontend with your Laravel backend.
Terminal
composer r fusionphp/fusion
Extract PHP Blocks
Extracts inline PHP blocks from JavaScript using Vite and saves them to disk.
Inject Runtime Data
Injects runtime data into your JavaScript during Vite transpilation.
Backend + Frontend
Runs PHP on the backend and JavaScript on the frontend — clean separation.
Controller Transformation
Transforms PHP blocks into backend controllers automatically.
Laravel Native
Fully integrates with Laravel: routing, middleware, auth, and request lifecycle.
Reactive State Sync
Keeps frontend and backend state in perfect sync.
Using Fusion, you can write a single file like this
Choose between procedural or class-based styles, both integrating seamlessly with your frontend.
<php> $name = prop(auth()->user()->name); </php> <template> Hello {{ name }}! </template>
<php> new class { public string $name; public function mount() { $this->name = Auth()->user()->name; } } </php> <template> Hello {{ name }}! </template>