PHPackages                             laravel-solo/live-reload - 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. laravel-solo/live-reload

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

laravel-solo/live-reload
========================

A PHP-only live reload tool for Laravel local development.

v1.1.0(1mo ago)511↓50%2MITPHPPHP ^7.3|^8.0CI passing

Since Jun 11Pushed 1mo agoCompare

[ Source](https://github.com/amirciit/laravel-solo-live-reload)[ Packagist](https://packagist.org/packages/laravel-solo/live-reload)[ RSS](/packages/laravel-solo-live-reload/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (14)Versions (3)Used By (0)

Laravel Solo Live Reload
========================

[](#laravel-solo-live-reload)

A PHP-only live reload package for Laravel local development.

Laravel Solo Live Reload watches your Laravel files, injects a small browser client into local HTML responses, and reloads the browser when files change. It does not require Node.js, npm, Vite, Webpack, Laravel Mix, BrowserSync, socket.io, or any frontend build tool.

Why This Package?
-----------------

[](#why-this-package)

Laravel already has excellent frontend tooling, but many projects do not need a full JavaScript build pipeline just to refresh the browser after editing Blade, PHP, CSS, or JavaScript files.

This package is designed for simple Laravel development workflows:

- PHP-only live reload
- No Node.js required
- No npm required
- No Vite required
- No BrowserSync required
- Works with `php artisan serve`
- Safe for local development only
- Runs only when `APP_ENV=local`

Features
--------

[](#features)

- Auto browser reload on watched file changes
- CSS-only hot reload for `.css` files
- Browser overlay for connection and reload status
- Watcher health warning in the browser when the watcher stops
- Multi-tab sync using `BroadcastChannel` with `localStorage` fallback
- Optional browser desktop notifications
- Local status dashboard
- Recent change history in status output
- Setup diagnostics with `live-reload:doctor`
- Pipeline self-test with `live-reload:test`
- Package summary with `live-reload:about`
- Optional browser auto-open with `--open`
- Clean terminal output by default
- Optional raw server logs with `--show-server-logs`
- Configurable watch paths, extensions, ignored paths, and presets
- Windows, macOS, and Linux support
- Laravel 8, 9, 10, 11, and 12 support

Requirements
------------

[](#requirements)

- PHP `^7.3` or `^8.0`
- Laravel 8 or newer
- Composer

Installation
------------

[](#installation)

Install the package as a development dependency:

```
composer require laravel-solo/live-reload --dev
```

Publish the configuration file:

```
php artisan live-reload:install
```

This creates:

```
config/live-reload.php
```

If you recently installed or updated the package, clear Laravel caches:

```
php artisan optimize:clear
```

Quick Start
-----------

[](#quick-start)

Start Laravel and the live reload watcher together:

```
php artisan live-reload:serve --host=127.0.0.1 --port=8000
```

Open:

```
http://127.0.0.1:8000
```

Now edit a watched file, for example:

```
resources/views/layouts/sidebar.blade.php
```

The browser reloads automatically.

Common Commands
---------------

[](#common-commands)

### Start Server And Watcher

[](#start-server-and-watcher)

```
php artisan live-reload:serve --host=127.0.0.1 --port=8000
```

Runs `php artisan serve` and `php artisan live-reload:watch` together.

### Start And Open Browser

[](#start-and-open-browser)

```
php artisan live-reload:serve --host=127.0.0.1 --port=8000 --open
```

Starts the server, starts the watcher, and opens your browser automatically.

### Show Raw Server Logs

[](#show-raw-server-logs)

```
php artisan live-reload:serve --host=127.0.0.1 --port=8000 --show-server-logs
```

By default, raw `php artisan serve` access logs are hidden because the live reload client polls the server frequently. Use this option only when debugging requests.

### Run Watcher Separately

[](#run-watcher-separately)

Terminal 1:

```
php artisan serve --host=127.0.0.1 --port=8000
```

Terminal 2:

```
php artisan live-reload:watch
```

### Status

[](#status)

```
php artisan live-reload:status
```

Shows whether live reload is enabled, watcher state, watched paths, ignored paths, intervals, and the last changed file.

### Doctor

[](#doctor)

```
php artisan live-reload:doctor
```

Checks common setup problems:

- Environment
- Package enabled state
- Middleware injection
- Storage writability
- Route registration
- Watched paths
- Watchable files
- Watcher process
- CSS hot reload
- Laravel config and route cache warnings

JSON output:

```
php artisan live-reload:doctor --json
```

### About

[](#about)

```
php artisan live-reload:about
```

Shows package name, environment, enabled state, preset, route prefix, status URL, config path, and storage path.

### Self-Test

[](#self-test)

```
php artisan live-reload:test
```

Checks the local environment gate, storage writability, route registration, reload signal write/read, and recent change history.

JSON output:

```
php artisan live-reload:test --json
```

### Clear Temporary Files

[](#clear-temporary-files)

```
php artisan live-reload:clear
```

Deletes temporary files from:

```
storage/framework/live-reload
```

Use this if the watcher says it is already running after a terminal was closed unexpectedly.

Browser Status Dashboard
------------------------

[](#browser-status-dashboard)

Open:

```
http://127.0.0.1:8000/__live-reload/status
```

JSON status:

```
http://127.0.0.1:8000/__live-reload/status?format=json
```

Configuration
-------------

[](#configuration)

Published config:

```
config/live-reload.php
```

Useful `.env` options:

```
LIVE_RELOAD_ENABLED=true
LIVE_RELOAD_PRESET=laravel
LIVE_RELOAD_POLL_INTERVAL=800
LIVE_RELOAD_SCAN_INTERVAL=500
LIVE_RELOAD_DEBOUNCE_MS=300
LIVE_RELOAD_RELOAD_DELAY_MS=80
LIVE_RELOAD_INJECT_ON_ERROR_PAGES=true
LIVE_RELOAD_STATUS_HISTORY_LIMIT=10
LIVE_RELOAD_SHOW_SERVER_LOGS=false
LIVE_RELOAD_CSS_HOT_RELOAD=true
LIVE_RELOAD_MULTI_TAB_SYNC=true
LIVE_RELOAD_AUTO_OPEN_BROWSER=false
LIVE_RELOAD_DESKTOP_NOTIFICATIONS=false
LIVE_RELOAD_OVERLAY=true
LIVE_RELOAD_OVERLAY_POSITION=bottom-right
LIVE_RELOAD_OVERLAY_DURATION=2200
```

Watch Presets
-------------

[](#watch-presets)

Use presets to quickly change what the watcher monitors.

```
LIVE_RELOAD_PRESET=laravel
```

Available presets:

PresetPurpose`laravel`Default Laravel development`blade-only`Blade view work`backend-only`PHP, routes, config, database, and `.env` work`frontend-assets`Views, CSS, JS, and public assets`package-development`Laravel package developmentDefault Watched Paths
---------------------

[](#default-watched-paths)

```
'watch_paths' => [
    app_path(),
    base_path('routes'),
    resource_path('views'),
    resource_path('css'),
    resource_path('js'),
    public_path(),
    config_path(),
    database_path('migrations'),
    database_path('seeders'),
    base_path('lang'),
    base_path('.env'),
],
```

Default Watched Extensions
--------------------------

[](#default-watched-extensions)

```
'watch_extensions' => [
    'php',
    'blade.php',
    'css',
    'js',
    'json',
    'env',
    'xml',
    'yml',
    'yaml',
],
```

How It Works
------------

[](#how-it-works)

1. The watcher scans configured paths.
2. It stores a snapshot of file modification times and sizes.
3. When a file is created, updated, or deleted, it writes a reload signal.
4. The browser client polls `/__live-reload/version`.
5. The browser warns if the watcher process stops.
6. When the version changes, the browser reloads.

Reload signal example:

```
{
  "version": "1710000000000",
  "changed_file": "resources/views/home.blade.php",
  "changed_type": "updated",
  "changed_at": "2026-06-11 12:30:00"
}
```

Runtime files are written under `storage/framework/live-reload`. The package creates a `.gitignore` inside that directory so `reload.json`, `history.json`, and `watcher.pid` are not committed or deployed.

Injected browser client:

```

```

CSS Hot Reload
--------------

[](#css-hot-reload)

If a `.css` file changes and CSS hot reload is enabled, the package updates stylesheet URLs with a cache-busting query string instead of reloading the whole page.

Disable it:

```
LIVE_RELOAD_CSS_HOT_RELOAD=false
```

Desktop Notifications
---------------------

[](#desktop-notifications)

Desktop notifications are disabled by default.

Enable them:

```
LIVE_RELOAD_DESKTOP_NOTIFICATIONS=true
```

The browser may ask for notification permission.

Security
--------

[](#security)

This package is intended for local development only.

- Disabled unless `APP_ENV=local`
- Injection only runs when `APP_ENV=local`
- JSON responses are not modified
- API paths are not modified
- File downloads are not modified
- Binary and streamed responses are not modified
- Browser responses expose only relative changed file paths
- Absolute server paths and sensitive config values are not exposed
- Runtime state files are written to a git-ignored storage directory

Troubleshooting
---------------

[](#troubleshooting)

### Browser Does Not Reload

[](#browser-does-not-reload)

Run:

```
php artisan live-reload:doctor
```

Then check:

- `APP_ENV` is exactly `local`
- `LIVE_RELOAD_ENABLED` is not `false`
- The page is opened from the same URL printed by `live-reload:serve`
- The watcher is running
- The changed file is inside `watch_paths`
- The file extension is inside `watch_extensions`
- The file path is not inside `ignore_paths`
- `storage/framework/live-reload` is writable
- The page is a `text/html` response

### Routes Or Config Do Not Update

[](#routes-or-config-do-not-update)

Run:

```
php artisan optimize:clear
```

### Watcher Says It Is Already Running

[](#watcher-says-it-is-already-running)

Stop the old terminal process or run:

```
php artisan live-reload:clear
```

### Terminal Shows Too Many Request Logs

[](#terminal-shows-too-many-request-logs)

Use the normal command:

```
php artisan live-reload:serve
```

Raw server access logs are hidden by default. To show them:

```
php artisan live-reload:serve --show-server-logs
```

Testing
-------

[](#testing)

Run:

```
composer test
```

Or:

```
vendor/bin/phpunit
```

GitHub Actions
--------------

[](#github-actions)

The package includes a test workflow:

```
.github/workflows/tests.yml
```

It runs the package test suite across supported PHP and Laravel versions.

Releasing
---------

[](#releasing)

Use semantic version tags:

```
git tag v1.1.0
git push origin v1.1.0
```

Composer and Packagist will use Git tags as package versions.

License
-------

[](#license)

The MIT License.

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance93

Actively maintained with recent releases

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~11 days

Total

2

Last Release

35d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/76917814?v=4)[amirtariq](/maintainers/amirtariq)[@AmirTariq](https://github.com/AmirTariq)

---

Top Contributors

[![amirciit](https://avatars.githubusercontent.com/u/15179135?v=4)](https://github.com/amirciit "amirciit (5 commits)")

---

Tags

phplaraveldevelopmentbrowser-synclive-reload

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/laravel-solo-live-reload/health.svg)

```
[![Health](https://phpackages.com/badges/laravel-solo-live-reload/health.svg)](https://phpackages.com/packages/laravel-solo-live-reload)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77922.3M186](/packages/laravel-mcp)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M250](/packages/laravel-ai)[illuminate/queue

The Illuminate Queue package.

20432.6M1.7k](/packages/illuminate-queue)[laravel/surveyor

Static analysis tool for Laravel applications.

86121.4k14](/packages/laravel-surveyor)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
