Expose is built into Laravel Herd and works with Valet, Sail and php artisan serve. It shares your site with a public HTTPS URL and takes care of Vite's dev server for you.
Go to your project directory and run:
expose
Expose shares foldername.test. To share a specific site, name it:
expose share my-app.test
Share the port your app listens on:
# php artisan serve
expose share http://localhost:8000
# Laravel Sail
expose share http://localhost:80
If npm run dev is running, Expose detects the Vite process, shares it as well and rewrites the page to use it. Your CSS, JavaScript and hot reloading work through the tunnel without changing vite.config.js.
Visitors reach your app over HTTPS, while Expose talks to your local site. If Laravel generates http:// links or mixed-content assets, trust the proxy so it reads the forwarded scheme and host. In bootstrap/app.php:
->withMiddleware(function (Middleware $middleware) {
$middleware->trustProxies(at: '*');
})
Only do this in your local environment.
Use the public URL as the endpoint at your provider, for example for Laravel Cashier at /stripe/webhook or /paddle/webhook, and exclude that route from CSRF protection as the package's documentation describes. The Expose dashboard at http://127.0.0.1:4040 shows each webhook and can replay it. See Stripe webhooks.
An expose.yaml file in the project stores the subdomain, server and other options, so the whole team shares the site the same way with a plain expose.