How can I access my localhost from my physical Android device?
916
Try this:
php artisan serve --host 0.0.0.0 --port 80
Just make sure that the port is free.
Reference: https://stackoverflow.com/a/30675683/5192105
Author by
MHDEZ
Updated on December 20, 2022Comments
-
MHDEZ over 1 year
I have seen this question
I am creating a flutter app and restful API with Laravel. it is work on AVD with url = "10.0.2.2:8000". and my browsers on computer url = "localhost:8000". I turned off the firewall on windows 10. I can access to Xampp dashboard from my phone's browser "192.168.1.8:80" , but it doesn't work with port 8000
-
Sachin Bahukhandi almost 4 years
-
MHDEZ almost 4 yearsgreat it is work thanks a lot
-
Sachin Bahukhandi almost 4 yearsSure I shall post this as an answer for anyone who visits this in future.
-
Abiye Chris. I. Surulere almost 4 yearsyou also use ngrok
-
-
Sachin Bahukhandi almost 4 yearsIt goes on to listen on default port
8000
. -
Jeremy Caney almost 4 yearsWhile it’s acceptable to provide command-only answers, it’s often more useful for the community if you can also provide an explanation of the command and help people understand why it addresses the problem. That can reduce the number of follow-up questions, and help new developers understand the underlying concepts. Would you mind updating your question with additional detail?