I'm trying to connect to access my laravel app from a another device on the same network. Is this possible?
3 Answers
You can give access to everyone to your app by using
valet share
If you want to access it only locally, you can edit you hosts file on your other device and bind the valet URL to your first computer ip
192.168.1.19 laravel.dev
You just have to check if your computer allow remote access.
BTW the valet share command is way more easier :)

- 4,246
- 1
- 14
- 31
-
don't just simply type 'valet share', also add the site-name of the site you want to share to the command (i had to figure that out first so maybe this comment will help someone) – nerdess Feb 14 '21 at 16:03
use Valet share
However this only works if you are not serving the app via https using valet secure
.
After running valet share
, a URL that looks like "2jd437s.ngrok.io" will be generated. And that's what you will use to visit your app remotely.
To cancel, use Ctrl+c

- 71
- 5
-
Valet share now works with HTTPS too! https://github.com/laravel/valet/pull/630 – jpmc Jun 07 '20 at 17:47
Hope, it will help someone as I've wasted my 1 day to complete this simple heck.
My Goal was: Share my localhost URL as https with external service like Paypal, Stripe.
Steps:
My Local URL is: yourdomain.test
Step 1: First secure my local url to enable https
:
valet secure yourdomain.test
Step 2: Next Share my localhost
to outside of the internet:
valet share https://yourdomain.test
Booooom. Now, You'll get an ngrock
URL and that would be pretty awesomely work like this - https://1bba-103-108-147-143.ngrok.io . [Click this URL to browser and you'll able to access your localhost from outside]
Note: This ngrock URL would work upto 2 hour by default. So to solve this please create an ngrock account -
Download ngrock on local - https://dashboard.ngrok.com/get-started/setup
Validate Your ngrock in localhost terminal with authtoken - https://dashboard.ngrok.com/get-started/your-authtoken
Great, now again share your localhost URL -
valet share https://yourdomain.test
It will available on the internet if your local stay alive, there is no time limitation now.

- 4,610
- 1
- 37
- 34
-
For Wordpress sites to keep url permanently - `./ngrok http -host-header=rewrite wp.wedevs.test` – Maniruzzaman Akash Oct 18 '21 at 13:56