I'm working on a Laravel project and I need to share it with other devices on my local network. I'm running into some issues because I tried using Herd and ngrok, but they don't support SSL, leading to errors when users attempt to log in. I've experimented with different configurations but haven't had any success yet. My goal is to keep the hosting local for security reasons, so I don't want to upload it to a server.
3 Answers
You can use the command `php artisan serve --host=[your local ip] --port=8000` to host your Laravel project. To find your local IP address, run `ipconfig` on Windows (or `ifconfig` on Linux). It usually looks something like `192.168.1.x`. Then, from another device on the same network, open a browser and type in `[your local ip]:8000`. For example, if your IP is `192.168.1.14`, you'd go to http://192.168.1.14:8000. Just keep in mind that 'npm run dev' might cause issues with this setup, so consider using 'npm run build' instead if needed.
Port forwarding can also work, but I understand if you're trying to avoid that. Just be careful with sensitive data when opening up your network.
Have you tried using Tailscale? It could simplify sharing your project securely over your local network without any SSL issues.

That's right! Just make sure you stop 'npm run dev' if it's still running to avoid conflicts.