If you are Working with laravel API and and want to test your app in local with android emulator or your mobile Connected to your Computer, so just follow the below Steps.
As we all know that when we are testing our laravel API in LocalHost, then it runs in our browser but if we try to access the Data with API in our Android App then its not work. So Today i’ll Explain you all,
How to Test Laravel API from Localhost to Android Emulator.
Step 1. First Find out your IPv4 Address by Typing
ipconfig command in your Command Prompt or Power Shell
Step 2. Now run the
php artisan serv --host 192.168 . * . ***
It will start Laravel development server in your ip which is accessible to your android app your are developing and testing in your local Environment. After running the command Laravel development server is started and provide you the server url like this => http://192.168.1.365:8000
Step 3. Now you can provide the above server url in your App and test Laravel API in your Local Environment.
- [SOLVED] Flutter:Not showing “Open for editing in Android Studio” - June 4, 2021
- [Solved] Flutter : [core/not-initialized] Firebase has not been correctly initialized. Have you added the “google-services.json” file to the project? - May 21, 2021
- [SOLVED] Flutter : NoSuchMethodError: The getter ‘isEmpty’ was called on null. - May 21, 2021