DEV Community

Cover image for Test your Laravel project easily with Phone. 📲
Luca
Luca

Posted on

8 1

Test your Laravel project easily with Phone. 📲

Hi guys, this is a small tutorial for test your local developing Laravel Web Application with your Phone easily.

1) Wi-Fi Hotspot Phone: 📶

  • Open setting on your mobile phone -> activate Wi-Fi Personal Hotspot.
  • Connect your PC to the Wi-Fi network of your Mobile Hotspot.

2) Check your IP adress by terminal: 👨‍💻

  • Windows: ipconfig
  • MacBook: ifconfig

Copy the address situated here:

Alt Text

3) Last step: 🖥

  • Go to your Laravel application project -> open terminal -> run the following command to turn on the built in server.

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

  • Insert your Password and well done, you have id for test your Laravel project on you mobile phone browser!

Alt Text

4)Enjoy! 🤳

Alt Text

Image of Bright Data

Scale Your Data Needs Effortlessly – Expand your data handling capacities seamlessly.

Leverage our scalable solutions to meet your growing data demands without compromising performance.

Scale Effortlessly

Top comments (2)

Collapse
 
thaariqnst profile image
thaariq nasution

Hi, thanks for sharing. This works for me but, when i open it, it doesn't displayed as it should be (it looked like a html page without css), i'm using TailwindCSS for my framework maybe that's why?

Collapse
 
ououssama profile image
ououssama • Edited

Hi @thaariqnst, i had the same problem i solve it by adding this option to vite.config.js file

  server: {
    host: your-ip-here
  },
Enter fullscreen mode Exit fullscreen mode

then run npm run dev --host

Image of Bright Data

Maintain Seamless Data Collection – No more rotating IPs or server bans.

Avoid detection with our dynamic IP solutions. Perfect for continuous data scraping without interruptions.

Avoid Detection

👋 Kindness is contagious

Engage with a sea of insights in this enlightening article, highly esteemed within the encouraging DEV Community. Programmers of every skill level are invited to participate and enrich our shared knowledge.

A simple "thank you" can uplift someone's spirits. Express your appreciation in the comments section!

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found this useful? A brief thank you to the author can mean a lot.

Okay