PHPackages                             localhoist/laravel - 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. localhoist/laravel

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

localhoist/laravel
==================

php artisan share — put your local Laravel dev environment online with Vite HMR, Reverb websockets, and signed URLs all working through one tunnel.

v0.3.0(1mo ago)019MITPHPPHP ^8.2

Since Jul 10Pushed 1mo agoCompare

[ Source](https://github.com/xPapay/localhoist-laravel)[ Packagist](https://packagist.org/packages/localhoist/laravel)[ Docs](https://localhoist.io)[ RSS](/packages/localhoist-laravel/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (6)Versions (7)Used By (0)

localhoist/laravel
==================

[](#localhoistlaravel)

`php artisan share` — the Laravel-native entry point for [localhoist](https://github.com/xPapay/localhoist). Puts your local dev environment online with Vite HMR, Reverb websockets, and signed URLs all working through one tunnel, zero config. With this package installed, localhoist also stops touching your `.env` entirely.

> Development happens in the [localhoist monorepo](https://github.com/xPapay/localhoist)(`packages/laravel`); this repository is a read-only split for Composer. Report issues there.

Install
-------

[](#install)

```
composer require --dev localhoist/laravel
```

If the package isn't on Packagist yet, install straight from the split repository:

```
composer config repositories.localhoist vcs https://github.com/xPapay/localhoist-laravel
composer require --dev "localhoist/laravel:^0.1"
```

Hacking on the monorepo? Use a path repository instead:

```
composer config repositories.localhoist path /path/to/localhoist/packages/laravel
composer require --dev "localhoist/laravel:*@dev"
```

Usage
-----

[](#usage)

```
php artisan share                              # Cloudflare quick tunnel — free, no account
php artisan share --transport=ngrok            # ngrok instead (needs an authtoken)
php artisan share --domain=my-app.ngrok-free.dev   # stable domain (implies ngrok)
php artisan share --no-qr
```

The default transport is a Cloudflare quick tunnel: no account, no setup, a random `*.trycloudflare.com` URL per run. Prefer ngrok every time? Save it once — `localhoist config set transport ngrok` — and `php artisan share`picks it up.

Which command? (it runs on your host)
-------------------------------------

[](#which-command-it-runs-on-your-host)

The tunnel always runs on your **host machine** — that's where your ports are published. `php artisan share` is just a launcher for the host binary, so it needs your PHP to be on the host too:

Where your PHP runsRunOn the host`php artisan share`In a container`localhoist` on the host, from your project directory (install it via Homebrew or `go install`)When PHP is containerized, `artisan` runs *inside* the container and can't reach the host's published ports — so `php artisan share` detects this and **stops with the host command to run instead** rather than failing halfway. Have a non-standard setup that publishes ports differently? `php artisan share --force` runs it anyway.

Zero `.env` mutation
--------------------

[](#zero-env-mutation)

The package ships a `TrustLocalhoistProxy` middleware, auto-registered in the `local` environment. The localhoist mux stamps every proxied request with an `X-Localhoist` marker; the middleware trusts the proxy only when the request comes from loopback **and** carries that marker. Laravel then derives scheme and host from the tunnel's `X-Forwarded-*` headers, so `url()`, `asset()`, redirects, and signed URLs are generated against the public https origin — with `.env` untouched.

The binary detects this package in `composer.lock` (&gt;= 0.2) and skips its `.env` patching automatically. Forwarded headers on requests without the marker are ignored, and nothing is trusted outside the `local` environment.

Edge case: URLs generated outside a request (e.g. links in queued emails) still come from `APP_URL`. Run `php artisan share --env-patch` when you need those pointing at the tunnel.

How it finds the binary
-----------------------

[](#how-it-finds-the-binary)

The command is a thin wrapper around the `localhoist` Go binary (tailwindcss-standalone pattern). Resolution order:

1. `LOCALHOIST_BINARY` environment variable
2. `localhoist` on your `PATH`
3. `~/.localhoist/bin/` cache
4. Downloaded from the matching GitHub release (first run only)

Until binaries are published, build from source and use option 1 or 2: `go build ./cmd/localhoist`.

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance91

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community6

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 ~1 days

Total

6

Last Release

43d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/46a43dd497c1772acfff14423ae971997d08e5c918692797364ebfd0c5621a25?d=identicon)[xPapay](/maintainers/xPapay)

---

Top Contributors

[![xPapay](https://avatars.githubusercontent.com/u/16617174?v=4)](https://github.com/xPapay "xPapay (10 commits)")

---

Tags

laravelvitesharetunnelngrokreverbHmrlocalhoist

### Embed Badge

![Health badge](/badges/localhoist-laravel/health.svg)

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

###  Alternatives

[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

80427.1M249](/packages/laravel-mcp)[illuminate/queue

The Illuminate Queue package.

20433.0M1.9k](/packages/illuminate-queue)[spatie/laravel-health

Monitor the health of a Laravel application

88412.7M191](/packages/spatie-laravel-health)[laravel/ai

The official AI SDK for Laravel.

1.1k4.6M342](/packages/laravel-ai)[spatie/laravel-export

Create a static site bundle from a Laravel app

679153.2k7](/packages/spatie-laravel-export)[forjedio/inertia-table

Backend-driven dynamic tables for Laravel + Inertia.js

272.0k](/packages/forjedio-inertia-table)

PHPackages © 2026

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