I am in the process of upgrading my laravel application.
my old laravel using old version xampp.
Since new laravel 10 version require higher php version, I installed another newer xampp.
Everything works for both old and new laravel for website part using chrome.
I am using react native for mobile app using api part of laravel.
When I start laravel app with php artisan serve --host 127.0.0.1 --port=8010
My react native app fetching always return network error.
The api url is http://127.0.0.1:8010/api/user
.
This only happen if I fetch from my react native app.
It works when I use same api on chrome, it return json. This works fine for both laravel on chrome.
and It also works if I fetch same api to my old laravel.
My old laravel using same url without the port, since both xampp version using different port.
Any idea whats wrong here?
1
Answers
turn out the solution is I need to map my computer and emulator port