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 : PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null, null) - December 7, 2021
- [Solved] Flutter : Error: The getter ‘subhead’ isn’t defined for the class ‘TextTheme’ from package:flutter/src/material/text_theme.dart’ – searchable_dropdown - December 6, 2021
- [SOLVED] Flutter Error: The getter ‘body1’ isn’t defined for the class ‘TextTheme’ – place_picker. - December 6, 2021