PHPackages                             2amigos/yii2-google-places-library - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. 2amigos/yii2-google-places-library

AbandonedArchivedYii2-extension[API Development](/categories/api)

2amigos/yii2-google-places-library
==================================

Google Places API Library for Yii2.

1.0.3(7y ago)2595.1k↓40%171BSD-3-ClausePHP

Since May 28Pushed 7y ago16 watchersCompare

[ Source](https://github.com/2amigos/yii2-google-places-library)[ Packagist](https://packagist.org/packages/2amigos/yii2-google-places-library)[ RSS](/packages/2amigos-yii2-google-places-library/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (7)Used By (1)

Google Places API Library for Yii2
==================================

[](#google-places-api-library-for-yii2)

[![Packagist Version](https://camo.githubusercontent.com/d5222a6ef8d6c7c1c580b84324f601d89bf32f034bbc4f8dae95a91652709ca8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f32616d69676f732f796969322d676f6f676c652d706c616365732d6c6962726172792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/2amigos/yii2-google-places-library)[![Latest Stable Version](https://camo.githubusercontent.com/d42c61f9520beb426e8fb5fdf49ef6f14e10d2441b0be9ad667a99b593a08abd/68747470733a2f2f706f7365722e707567782e6f72672f32616d69676f732f796969322d7573756172696f2f76657273696f6e)](https://packagist.org/packages/2amigos/yii2-google-places-library)[![Total Downloads](https://camo.githubusercontent.com/74f6b62e9cd9e0b1874f32738df7900bbddf6cb650c5f56a4ce7b2e7445bcdd8/68747470733a2f2f706f7365722e707567782e6f72672f32616d69676f732f796969322d676f6f676c652d706c616365732d6c6962726172792f646f776e6c6f616473)](https://packagist.org/packages/2amigos/yii2-google-places-library)[![Latest Unstable Version](https://camo.githubusercontent.com/9fb2441c22fef4b0a471b5524609a5f1aaab59bf280aedf4efe428e18733212a/68747470733a2f2f706f7365722e707567782e6f72672f32616d69676f732f796969322d676f6f676c652d706c616365732d6c6962726172792f762f756e737461626c65)](//packagist.org/packages/2amigos/yii2-google-places-library)
[![Scrutinizer Code Quality](https://camo.githubusercontent.com/baa348fb81a87f2ad42e4c95d96cb5543b48e1ffe18427ff1863f8c857a5ee62/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f32616d69676f732f796969322d676f6f676c652d706c616365732d6c6962726172792f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/2amigos/yii2-google-places-library/?branch=master)

Extension library to interact with [Google Places API](https://developers.google.com/places/documentation/index) by wrapping the methods of our [2amigos/google-places-library](https://github.com/2amigos/google-places-library) into Yii2 components.

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

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
-----

[](#usage)

The preferred way is to setup the components into our Application's configuration array:

```
'components' => [
    'places' => [
         'class' => '\dosamigos\google\places\Places',
         'key' => '{your-google-api-key-with-places-activated}',
         'format' => 'json', // or 'xml'
         'forceJsonArrayResponse' => true // for decoding responses to arrays instead of objects
     ],
     'placesSearch' => [
         'class' => '\dosamigos\google\places\Search',
         'key' => '{your-google-api-key-with-places-activated}',
         'format' => 'json' // or 'xml'
     ]

]
```

That's it, you are ready to use them as Yii2 components.

**Using Search Component**

```
// If you setup the format in 'json', the returned value will be an array. If 'xml', it will return a SimpleXmlElement.
var_dump(Yii::$app->search->text('restaurants in Inca Mallorca'));
```

**Using Places component**

```
var_dump(Yii::$app->place->details('{REFERENCEIDOFPLACE}'));
```

Further Information
-------------------

[](#further-information)

For further information regarding the multiple parameters of Google Places please visit [its API reference](https://developers.google.com/places/documentation/index) and our standalone library [2amigos/google-places-library](https://github.com/2amigos/google-places-library)

> [![](https://camo.githubusercontent.com/9fd8f1de41dc23003bb2a54034cb6658dde5be97092e195a62d629d0d7fa7f6c/687474703a2f2f7777772e67726176617461722e636f6d2f6176617461722f35353336333339346437323934356666376564333132353536656330343165302e706e67)](http://www.2amigos.us)
>  *Custom Software Development | Web &amp; Mobile Development Software*
>  [www.2amigos.us](http://www.2amigos.us)

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity43

Moderate usage in the ecosystem

Community22

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 73.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~425 days

Total

5

Last Release

2672d ago

Major Versions

0.1.0 → 1.0.02017-08-01

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/566016?v=4)[Antonio Ramirez](/maintainers/tonydspaniard)[@tonydspaniard](https://github.com/tonydspaniard)

---

Top Contributors

[![tonydspaniard](https://avatars.githubusercontent.com/u/566016?v=4)](https://github.com/tonydspaniard "tonydspaniard (11 commits)")[![lrod](https://avatars.githubusercontent.com/u/9151320?v=4)](https://github.com/lrod "lrod (2 commits)")[![Borales](https://avatars.githubusercontent.com/u/1118933?v=4)](https://github.com/Borales "Borales (1 commits)")[![panshaigan](https://avatars.githubusercontent.com/u/8525328?v=4)](https://github.com/panshaigan "panshaigan (1 commits)")

---

Tags

2amigoscomponentgoogleplacesyii2googlelibraryextensionyiiplaces

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/2amigos-yii2-google-places-library/health.svg)

```
[![Health](https://phpackages.com/badges/2amigos-yii2-google-places-library/health.svg)](https://phpackages.com/packages/2amigos-yii2-google-places-library)
```

###  Alternatives

[skagarwal/google-places-api

Google Places Api

1913.0M8](/packages/skagarwal-google-places-api)[skeeks/yii2-google-api

Component for work with google api based on google/apiclient

1243.1k1](/packages/skeeks-yii2-google-api)[biscolab/google-maps-php-sdk

Google Maps PHP SDK.

14215.1k](/packages/biscolab-google-maps-php-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
