In order to get the Android emulator to play nice with a local Laravel api you need to set the dev machine to a static ip of say 192.168.1.10 for example. Your api address from an Android virtual device would then be http://192.168.1.10/your/api/endpoints and you need to start php artisan serve with the following switches.

php artisan serve –host 0.0.0.0

I can not get this to work with Laravel Valet.

Last modified: 02/11/2020

Comments

Write a Reply or Comment

Your email address will not be published.