I'm working on a website in Laravel which I run on Homestead 0.2.0 and I want to try to connect to it with my phone and tablet so I can test the website on those devices.
So I was googling around, trying to look how to do so. However, I can't find any articles that take multiple sites into account.
I read somewhere however that some routers don't allow WiFi connected devices to connect to directly connected devices.
I have my sites mapped like so:
sites:
- map: app1.local
to: /home/vagrant/projects/app1/public
- map: app2.local
to: /home/vagrant/projects/app2/public
- map: app3.local
to: /home/vagrant/projects/app3/public
How do I proceed?
Add an entry 192.168.10.10
for the app you wanna test on your phone in the Homestead.yaml file and revision the Homestead machine. Then load ipaddress:8000
on your phone
Upgrade to the latest Homestead, which maps *.app to 192.168.10.10
Then your hosts
file has these entries:
192.168.10.10 app1.app app2.app app3.app
Let's say, your developing computer is using IP 192.168.0.102
.
You can browse on your phone to
192.168.0.102:8000
to load/test app1.app
(first in alphabetical order)
Change your Homestead.yaml file from:
map: app3.app
to: /home/vagrant/projects/app3/public
to:
map: app3.app
to: /home/vagrant/projects/app3/public
map: 192.168.10.10
to: /home/vagrant/projects/app3/public
Simply change the entry and revision the Homestead machine to test another app on your phone.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With