Convert it to laravel which can return json like you want https://packagist.org/packages/alexpechkarev/google-maps
Alternatively you need to need to run a node server that can run your Javascript server side
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi, I have javaScript code for GoogleMap, what I am doing I am passing my lat and lng and in return, google Map provides me the list of locations, I simply convert that list to JSON.
Now I want that JSON response in API call in return response, But when I hit my end point in POSTMAN instead of response I am getting my whole code of JavaScript. I know the reason because javascript is a client-side language so that why I am getting the whole code, but I need a solution for that please guide me.
Please or to participate in this conversation.