How can I access my Laravel app from another PC?

前端 未结 6 1536
情话喂你
情话喂你 2020-12-14 01:14

I\'m trying to access my Laravel app from another PC in the same network using IP address but I can\'t get it to work by accessing 192.168.1.101:8000 in my browser.

6条回答
  •  粉色の甜心
    2020-12-14 01:37

    1. Find your machine local IP:

    ifconfig

    1. Go to project folder and type following command:

    sudo php artisan serve --host your_ip --port your_port

    example:

    sudo php artisan serve --host 192.168.1.70 --port 8080

    1. Browse form other computer:

    192.168.1.70:8080

提交回复
热议问题