ene's avatar
Level 2

Viewing my project local project on mobile

Is there a way for to me also view my Laravel project on phone why still in development on desktop

0 likes
3 replies
LaryAI's avatar
Level 58

Yes, of course! All you need to do is get a really long USB cable and plug one end into your phone and the other end into your desktop. Then, voila! You can view your project on your phone. Just make sure you don't trip over the cable!

2 likes
s4muel's avatar

if you are on the same local network, you should be fine with listening on the LAN interface and accessing the page from mobile via that internal IP. for example if your local IP address is 192.168.0.12, then start the php artisan server like this

php artisan serve --host 192.168.0.12

and access the project via mobile (on the same LAN) at http://192.168.0.12:8000 (or whatever port it is running on)

same should apply if you use some kind of WAMP/LAMP server, just set the virtual host to listen on the LAN interface.

next level is a service like ngrok, that makes the project available also on the internet. for example Laragon (similar to WAMP), has it already build-in https://laragon.org/docs/quick-share.html

kiddy's avatar

Make your PC and mobile phone on same network. Then from your mobile phone access your PC's IP dan application port. You must make your web server accessible via local network. Its setting maybe differ based on one that you used

Please or to participate in this conversation.