- What is emaia/laravel-hotwire-turbo used for?
- It integrates Hotwire Turbo with Laravel so you can build fast, server-rendered interfaces with minimal JavaScript. The package provides Blade-friendly helpers for Turbo Drive navigation, Turbo Frames, and Turbo Streams. It also offers conventions for controller responses that fit naturally into Laravel routes, views, and validation flows.
- How do I install emaia/laravel-hotwire-turbo in a Laravel app?
- Install it with Composer by running composer require emaia/laravel-hotwire-turbo. Laravel package auto-discovery should register the service provider if the package supports it. After installation, check the package README for any configuration or publishing steps.
- Which Laravel versions does this package support?
- The package is designed for Laravel applications and follows standard Laravel package conventions. The exact Laravel and PHP version constraints should be confirmed in the package composer.json before installing. Review those constraints against your application's current Laravel version to avoid compatibility issues.
- How do Turbo Frames work with Laravel Blade in this package?
- Turbo Frames let you scope navigation and updates to part of a page instead of reloading the whole document. This package provides Blade-friendly helpers so you can define frames and target partial updates from Laravel views. You can combine frames with normal Laravel routes and controllers to render focused page sections.
- How do I return Turbo Stream responses from a Laravel controller?
- The package includes streamlined controller response conventions for Turbo Streams, so you can return partial updates from Laravel actions. You build the stream response in the controller and render the matching Blade template for the update. This keeps streamed responses consistent with Laravel's normal view and validation workflow.
- Can I use this package with Laravel validation errors and form submissions?
- Yes, the package is described as working with Laravel views, routes, and validation flows. Turbo form submissions can return normal Laravel validation responses, and the package's Turbo Stream and Frame helpers help you render errors or updated form sections. This keeps validation handling server-rendered rather than requiring a separate JavaScript API layer.
- Does this package require a JavaScript build step or Node?
- The package focuses on Laravel-side Blade helpers and response conventions, while Hotwire Turbo itself is typically included through a script tag or your frontend asset setup. It follows a progressive-enhancement approach, so you do not need a full SPA framework. You may still need to load Turbo's JavaScript in your layout to activate Drive, Frames, and Streams.
- How does Turbo Drive change navigation in a Laravel app?
- Turbo Drive intercepts normal link and form navigation and swaps page content without full browser reloads, giving a more SPA-like feel. With this package, Turbo Drive integrates with Laravel's existing routes and server-rendered views. You keep writing Laravel controllers and Blade templates while Turbo handles the navigation layer.
- Is emaia/laravel-hotwire-turbo suitable for production?
- It is a lightweight integration layer around Hotwire Turbo conventions, so production suitability depends on your Turbo setup, testing, and the package's maintenance status. Because it works with familiar Laravel views, routes, and validation flows, it fits naturally into server-rendered applications. Check the package's issue tracker, release history, and version constraints before relying on it in production.
- What are alternatives to this package for Hotwire in Laravel?
- Alternatives include manually adding Hotwire Turbo to a Laravel layout and writing your own Blade helpers or response macros. Some developers use Laravel Livewire or Inertia.js when they want different reactive or SPA-style approaches. This package is a good fit if you prefer minimal JavaScript and server-rendered Turbo Frames and Streams.