DEV Community

Arman Rahman
Arman Rahman

Posted on

How to Host a Laravel Script on a Local LAN Network and Access It From Any Connected Device

Sometimes, we need to test a local Laravel project on a mobile device or another device without deploying it to a server. By following a few simple steps, you can easily set up your Laravel application on a local LAN network and make it accessible to all connected devices.

Run This command on your laravel project

php artisan serve --host=0.0.0.0
Enter fullscreen mode Exit fullscreen mode

Go to the search button search for cmd and run:

ipconfig 
Enter fullscreen mode Exit fullscreen mode

Copy IPv4 Address from Wireless LAN adapter Wi-Fi

Example: 192.168.0.138

Your task is done. You just have to search like this on other devices that connected with the same LAN or Router Connection.

http://192.168.0.138:8000

Top comments (0)