DEV Community

dgloriaweb
dgloriaweb

Posted on

Using Google Places (new) Api in your Laravel application

I have struggled a while to understand the setup of the new requests. This I needed because the responses I've got from the old api to my search for places were missing places I knew existed. Therefore I experimented with the new Places Api.
The easiest way for me to start was to use my postman. However I didn't know how to use cURL in postman, but it was easy and quick. There is a button near "my workspace" on the left that says import. There I copied the example cURL from this page: https://developers.google.com/maps/documentation/places/web-service/nearby-search
It gave me the details, so I can see that most of the stuff goes into the header instead of the parameters, and the body is a normal json, where you can fiddle with the results.

Image description

Image description

Now I am ready to use this request in my laravel app.

Top comments (0)