- How do I install hotwired/stimulus-laravel in a Laravel application?
- Install it with Composer using composer require hotwired/stimulus-laravel, then run the package's Artisan installer command if one is provided. You will also need to add Stimulus through npm and wire the JavaScript entrypoint into your Vite build. Follow the package README for the exact command sequence and publish any config or stubs before generating your first controller.
- Which Laravel and PHP versions does hotwired/stimulus-laravel support?
- The package is intended for modern Laravel applications, but exact Laravel and PHP constraints are defined in its composer.json and release notes. Check those constraints before installing, especially if you are on an older Laravel version. Because the package is relatively young, confirm compatibility with your target Laravel release rather than assuming broad support.
- What Stimulus version does hotwired/stimulus-laravel expect?
- The package is built around Hotwired Stimulus and typically expects you to install Stimulus via npm alongside it. The pinned or expected Stimulus version should be confirmed in the package documentation and package.json stub. If you already have Stimulus in your app, verify that the package's setup does not introduce a conflicting version.
- Does hotwired/stimulus-laravel work with Vite, Laravel Mix, or importmaps?
- The package is designed to be Vite-friendly and is easiest to adopt when your Laravel app already uses Vite. Older Laravel Mix or importmap-based setups may require manual adaptation of the JavaScript entrypoint and controller registration. Confirm the expected asset pipeline in the README before committing to an approach.
- How does automatic controller registration work in hotwired/stimulus-laravel?
- The package provides conventions and scaffolding for registering Stimulus controllers so you do not have to wire each one by hand. It likely uses a generated manifest or a loader that discovers controllers in a designated directory. Check the published JavaScript stubs and README to see the exact registration pattern and directory structure.
- What files does the hotwired/stimulus-laravel installer modify or overwrite?
- The installer and generators may publish JavaScript controller stubs and update your frontend entrypoint or configuration files. Because installer behavior can change between releases, install on a branch and review the diff before merging. Back up or commit your existing Vite and JavaScript setup so you can revert any opinionated edits.
- Is hotwired/stimulus-laravel tested for its installers and generators?
- The package is a small community project, so test coverage for installers and generators may be limited compared with larger Laravel packages. Review the repository's test suite and recent commits if test coverage matters for your team. Plan to smoke-test installation and a sample controller generation in a branch before rolling it out.
- Can I use hotwired/stimulus-laravel with Livewire or Turbo?
- Yes, Stimulus is designed as a lightweight behavior layer and can coexist with Livewire or Turbo for progressive enhancement. The package fits best when Blade renders the UI and Stimulus adds small interactive behaviors. Define clear conventions for when to use Stimulus versus Livewire or Turbo to avoid overlapping responsibilities.
- Is hotwired/stimulus-laravel a replacement for React, Vue, or a full SPA framework?
- No. Stimulus is intentionally a sprinkles layer for adding reusable JavaScript behavior to server-rendered views, not a full frontend framework. The package is a poor fit for SPA-heavy stacks where Inertia, React, or Vue owns the UI layer. Use it when you want progressive enhancement without building a single-page application.
- What are the production and maintenance risks of using hotwired/stimulus-laravel?
- The runtime risk is low because the package mainly affects frontend scaffolding and developer workflow, not production infrastructure. The bigger risk is maturity: low adoption and a small maintainer surface mean possible command or stub churn and thin documentation. Pin the package version, monitor releases, and assign an internal owner who understands Laravel asset pipelines and Stimulus.