PHPackages                             hotwired-laravel/hotreload - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. hotwired-laravel/hotreload

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

hotwired-laravel/hotreload
==========================

Hot reloading for Hotwire

0.0.10(1mo ago)85733[1 issues](https://github.com/hotwired-laravel/hotreload/issues)MITPHPCI failing

Since Jan 23Pushed 6mo agoCompare

[ Source](https://github.com/hotwired-laravel/hotreload)[ Packagist](https://packagist.org/packages/hotwired-laravel/hotreload)[ RSS](/packages/hotwired-laravel-hotreload/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (8)Versions (12)Used By (0)

Hotreload for Turbo Laravel
---------------------------

[](#hotreload-for-turbo-laravel)

 [ ![Build Status](https://github.com/hotwired-laravel/hotreload/workflows/tests/badge.svg) ](https://github.com/hotwired-laravel/hotreload/actions) [ ![Latest Stable Version](https://camo.githubusercontent.com/ba98133e83a47c46c414340ca484d0c45c65a694590054b080e30f98c26dfaff/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f686f7477697265642d6c61726176656c2f686f7472656c6f6164) ](https://packagist.org/packages/hotwired-laravel/hotreload) [ ![License](https://camo.githubusercontent.com/2eb7a718c5f561a0ab137032d44b7e0116df91b667c5213ead11b0d07b933c1a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f686f7477697265642d6c61726176656c2f686f7472656c6f6164) ](https://packagist.org/packages/hotwired-laravel/hotreload)

It enhances development feedback loops by detecting source code changes and updating the page *smoothly* without requiring manual reloads.

*This package is still under development.*

#### Inspiration

[](#inspiration)

This package was *heavily* inspired by the [Hotwire Spark](https://github.com/hotwired/spark) gem. The JavaScript that makes this all work in the browser was copied from there. The package was reimplemented in PHP to work with Laravel.

### Installation

[](#installation)

```
composer require hotwired-laravel/hotreload --dev
```

That's it!

By default, a simple file watcher will be used. There's another file watcher that is more efficient but requires the [inotify](https://www.php.net/inotify-init) extension, which you may install via PECL:

```
pecl install inotify
```

Don't forget to enable it in your `php.ini`. Since this package is for local development only, you'll only need that extension locally. Once you have the extension installed and enabled, the package should automatically pick the correct file watcher.

Optionally, you may force the use of a specific file watcher by calling this code in your `AppServiceProvider@boot` method (don't forget to wrap it for local env only):

```
