I'm running a Laravel project locally using Herd and sometimes XAMPP on my Windows machine.
I’m trying to share a live link so that other devices (phones, laptops, etc.) on the same network can access the project.
Here’s what I’ve tried:
Accessing via local IP (
http://192.168.x.x:8000)Running
php artisan serve --host=0.0.0.0Using ngrok
Using localtunnel
Using ipconfig to get IPv4 and connect
Using Herd’s exposed URLs
The problems I'm facing:
Some links work on my phone but not on other PCs.
When the link works, CSS/JS styling does not load on other devices.
Vite assets only load properly on my local machine.
I want a link that works on every device (same network or internet) with full styling.
Environment:
Windows 10
Laravel 12
Herd (for PHP)
XAMPP (sometimes for MySQL)
Vite for asset bundling
npm run devrunning locally
Question:
Is there any reliable way to expose my Laravel + Vite project so that other devices can access it with full CSS and JS working?
Is there a better method than ngrok/localtunnel when using Herd + Vite?
Also open to solutions like temporary deployment or alternative local hosting setup.
I want a link that works on every device (same network or internet)...saying you want it available to internet users contradicts your earlier description. Make your mind up and clarify your question. The difference is significant. Also, opening things up to the public internet comes with a lot of security risks and, given the level of experience and knowledge you appear to have, I would strongly suggest that you're not in a position to consider doing that right now. Use a proper hosting company if you want to put the site live to the general public.