Skip to content

mg-code/yii2-google-places-library

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google Places API Library for Yii2

Latest Stable Version Total Downloads Latest Unstable Version License

Extension library to interact with Google Places API

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require "2amigos/yii2-google-places-library" "*"

or add

"2amigos/yii2-google-places-library" : "*"

to the require section of your application's composer.json file.

Usage

Using Search class:

$search = new Search(['key' => '{YOURGOOGLEAPIKEY}']);

// $this->format = 'xml'; // if you wish to handle XML responses (JSON is highly recommended)


// If you setup the format in 'xml', the returned value will be an array.
// The library will decode the response automatically
var_dump($search->text('restaurants in Inca Mallorca'));

Using Place class:

$place = new Place(['key' => '{YOURGOOGLEAPIKEY}']);

// $this->format = 'xml'; // if you wish to handle XML responses (JSON is highly recommended)


$place->details('{REFERENCEIDOFPLACE}'));

Further Information

For further information regarding the multiple parameters of Google Places please visit its API reference

2amigOS!

Web development has never been so fun! www.2amigos.us

About

Google Places API library for Yii2

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%