Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

drissboumlik's avatar

Access laravel api from different device localhost

have a front end App (built with angular 8) and a backend App (api) (build with laravel 6)

I want to access my app from different machine

When I access from machine 2 :

machine 1 : ng serve --host 0.0.0.0 from ==> machine 2 : http://machine1_Ip:4200 (WORKING)

machine 1 : php artisan serve --host 0.0.0.0 ==> machine 2 : http://machine1_Ip:8000 (NOT WORKING)

error message : "machine1_Ip took to long to respond"

Screenshot : https://imgur.com/5bd1x9s

0 likes
2 replies
tinfoilman's avatar

Are you sure there are no firewall settings that are blocking those ports from being accessed remotely?

drissboumlik's avatar

is it possible even I'm able to access the angular part and not the laravel part

Please or to participate in this conversation.