[英]How can I access my localhost from my physical Android device?
I have seen this question我看过这个问题
I am creating a flutter app and restful API with Laravel.我正在使用 Laravel 创建一个 flutter 应用程序和宁静的 API。 it is work on AVD with url = "10.0.2.2:8000".它适用于 url = "10.0.2.2:8000" 的 AVD。 and my browsers on computer url = "localhost:8000".和我在计算机 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我关闭了 windows 10 上的防火墙。我可以从手机浏览器“192.168.1.8:80”访问 Xampp 仪表板,但它不适用于端口 8000
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参考: https://stackoverflow.com/a/30675683/5192105
php artisan serve --host=you ip address php 工匠服务 --host=you ip 地址
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.