Build web and hybrid native apps in Laravel today.

Turbo Laravel integrates your Laravel application with Hotwire, an alternative way of building web and native apps with minimal JavaScript, by sending HTML over the wire.

composer require hotwired-laravel/turbo-laravel

Your typical Laravel app.

Hotwire was built for full-stack web frameworks like Laravel and Rails. Modern web applications don't have to be built as stateful components. Keep writing regular Cruddy applications, with controllers and Blade views, and progressively enhance the fidelity of your UI with Turbo Frames, Turbo Streams, or a sprinkle of JavaScript.

  1. Write a regular controller

    Routes, form requests, Eloquent, redirects. Nothing new to learn on the server.

  2. Return Blade HTML

    Render the views you already have. Wrap the parts that change in a frame or a stream.

  3. Turbo updates the page

    No full reloads, no JSON APIs, no client-side state to keep in sync.

Decompose screens with Turbo Frames.

Turbo Frames let predefined sections of your page update on request, independently of the rest of the page. Build data tables, inline forms and more in the blink of an eye.

Read more
{{-- chirps/show.blade.php --}}
<x-turbo::frame :id="$chirp">
    <p>{{ $chirp->content }}</p>
    <a href="{{ route('chirps.edit', $chirp) }}">Edit</a>
</x-turbo::frame>

{{-- chirps/edit.blade.php --}}
<x-turbo::frame :id="$chirp">
    <form action="{{ route('chirps.update', $chirp) }}">...</form>
</x-turbo::frame>

Come alive with Turbo Streams.

Turbo Streams deliver page changes as fragments of HTML: synchronously after a form submit, or asynchronously over WebSockets through Laravel Echo. Add a trait to your model and broadcasting just works.

Read more
class Comment extends Model
{
    use Broadcasts;
}

// And then...
$comment = $post->comments()->create($data);

$comment->broadcastPrependTo($post)
    ->toOthers()
    ->later();

Go native with iOS & Android.

Hotwire Native puts your Laravel application at the center of your iOS and Android apps, with seamless transitions between web and native screens. Turbo Laravel ships helpers for instrumenting your Hotwire Native clients.

Read more
app/Http/Controllers/ChirpsController.php
class ChirpsController
{
    use InteractsWithHotwireNativeNavigation;

    public function store(ChirpRequest $request)
    {
        $request->user()->chirps()->create(
            $request->validated()
        );

        return $this->recedeOrRedirectTo(
            to_back(route('chirps.index'))
        )->with('notice', __('Chirp created.'));
    }
}

Everything is testable.

Turbo Laravel ships testing helpers out of the box, so you can make sure your whole application works. The best part: not much changes from your typical Laravel testing approach.

Read more
tests/Feature/CreatesChirpsTest.php
it('creates chirps', function () {
    $response = $this->turbo()->post(route('chirps.store'), [
        'content' => 'Test Chirp',
    ]);

    $response->assertTurboStream(fn (AssertableTurboStream $streams) =>
        $streams->has(1)
            && $streams->hasTurboStream(fn ($stream) => $stream
                ->where('target', 'chirps')
                ->where('action', 'prepend')
                ->see('Test Chirp'))
    );
});

Just because your agent can generate thousands of lines of code doesn't mean it should.

With Hotwire, humans and agents build more with less. Plain controllers, Blade views and a sprinkle of Stimulus mean less code to generate, less code to review, and fewer places for bugs to hide.

Skills your agent can load

Turbo Laravel ships Laravel Boost guidelines and skills, so your agent writes idiomatic Turbo code from the first prompt.

Stimulus and Native, too

Stimulus Laravel publishes its own Boost guidelines, including one for Hotwire Native Bridge Components.

Small diffs, easy reviews

A frame here, a stream there. Changes stay in the files you already know, so reviewing your agent's work takes minutes.

resources/boost/skills
  • developing-with-turbo-basics dom_id, turbo_stream() and the x-turbo Blade components.
  • developing-with-turbo-drive SPA-like navigation, morphing and cache control.
  • developing-with-turbo-frames Scoped navigation, frame targeting and lazy loading.
  • developing-with-turbo-streams Partial page updates and real-time broadcasting.
  • developing-with-turbo-tests Testing Turbo and Hotwire Native behavior in Pest or PHPUnit.

Start a new app, already Hotwired.

A community-built starter kit with authentication, Turbo Laravel, Stimulus, Tailwind CSS and daisyUI components wired together. A #nobuild frontend out of the box, ready for Hotwire Native and for your coding agent. No Node.js required.

laravel new my-app --pest --no-node \ --using=hotwired-laravel/hotwire-starter-kit
Explore the starter kit

The Bootcamp.

Inspired by the official Laravel Bootcamp: a hands-on introduction to Hotwire and Turbo Laravel. You'll build a web application from scratch, then the hybrid native app for it.

Start learning
  1. 01 Installation
  2. 02 Creating chirps
  3. 03 Listing chirps
  4. 04 Editing chirps
  5. 05 Deleting chirps
  6. 06 Hotwiring everything
  7. 07 Broadcasting
  8. 08 Native apps

Pairs well with.

Turbo Laravel is one piece of the Hotwired Laravel stack. Add the rest as you need it.