
Good content takes time and effort to come up with.
Please consider supporting us by just disabling your AD BLOCKER and reloading this page again.
Namaste! In this article you will learn how to test your locally developing Laravel
web application from your phone browser without using any software.
I hope you guys have working Laravel
web application or fresh installation of your Laravel
in computer / laptop.
NOTE: I have my blog stackcoder
application for the sake of demonstration.
I have developed the stackcoder
Laravel web application in my local laptop and have created the virtual hosts which can be accessed with stackcoder.co:8888
from my laptop browser.
Now turn on your mobile hotspot and connect your laptop to it. I use ( Android )Redmi Note phone and you can find the hotspot enabling option with the following, this will mostly remain same for other devices too
i. Settings -> Portable Hotspot ->Portable Hotspot ( Turn On By Clicking Switch Button )
ii. Click On Setup Portable Hotspot -> Set SSID & PASSWORD
Your all set to share & connect your hotspot with SSID & PASSWORD
After connecting your laptop to mobile hotspot. Go to your terminal and type the following command
MACBOOK / UBUNTU
ifconfig
Windows
ipconfig
You will see the ip address allocated to your laptop there, for example mine is shown in the following image
Now go to your Laravel
application folder in the terminal and run the following command to turn on the built in server.
sudo php artisan serve --host 192.168.43.43 --port 80
Here we are using the same IP Address192.168.43.43
as that of my laptop got assigned after connecting to mobile hotspot in Step 3. And I want it to get connected with port80
by default
You will get the following success output after running the above command
sudo php artisan serve --host 192.168.43.43 --port 80
#ouput
Password:
Laravel development server started: http://192.168.43.43:80
Now your application is ready to be access with http://192.168.43.43:80
URL. No need to add port 80 as its the default port for HTTP
. You can test the same in your laptop before going to your phone browser.
Now go to your phone browser and open the URL http://192.168.43.43 you will be able to see the application developed as shown in the following image
Hope this article was helpful. You might be also interested in reading few of my other articles which will be really helpful for you
Laravel 7.x Multiple Database Connections, Migrations, Relationships & Querying
PHP extension ext-intl * is missing
Test Your Local Developing Laravel Web Application From Phone Browser Without Any Software
Search Engine Optimization Concepts
composer.json v/s composer.lock
Manipulate HTML Using DOMDocument In PHP
Securely Connect Server MYSQL DB From Sequel Pro / MYSQL Workbench
Install NGINX In Linux / Ubuntu And Managing
SummerNote WYSIWYG Text Editor
Why And How To Use PHP PDO With CRUD Examples
What Is Method Chaining In PHP?