How can I access my Laravel app from another PC?

Access laravel using your IP address

php artisan serve --host 0.0.0.0 

Now you can access laravel server by http://laravel-server-ip-address:8000

If you want to change the port as well then

php artisan serve --host 0.0.0.0 --port 8101

Now your laravel server is http://laravel-server-ip-address:8101


Why don't you use Laravel's artisan for it? Very simple:

sudo php artisan serve --host 192.168.1.101 --port 80

Now from other computers, you can type: http://192.168.1.101

Do not forget to replace the IP with your own local one. That's it.

Note: The sudo is only needed if you wanna serve on port 80.

Tags:

Php

Laravel