DEV Community

dgloriaweb
dgloriaweb

Posted on

3

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.

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay