PHPackages                             mrjonleek/laravel-google-api - 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. mrjonleek/laravel-google-api

AbandonedArchivedLibrary[API Development](/categories/api)

mrjonleek/laravel-google-api
============================

A Laravel/Lumen package for working with Google API services.

v1.0.0(8y ago)01.7k2DBADPHPPHP &gt;=5.5.9

Since Aug 19Pushed 8y ago1 watchersCompare

[ Source](https://github.com/mrjonleek/laravel-google-api)[ Packagist](https://packagist.org/packages/mrjonleek/laravel-google-api)[ RSS](/packages/mrjonleek-laravel-google-api/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (4)Versions (2)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/7755571b1f7de1252601478c020a59c1d4245dcd7c3d1a61c8363a8702443fc1/68747470733a2f2f706f7365722e707567782e6f72672f6d726a6f6e6c65656b2f6c61726176656c2d676f6f676c652d6170692f762f737461626c65)](https://packagist.org/packages/mrjonleek/laravel-google-api)[![License](https://camo.githubusercontent.com/67ad2a13463c95ee9e7f837aefc1225f4d6305bcc03a2a09439ce90568c676d9/68747470733a2f2f706f7365722e707567782e6f72672f6d726a6f6e6c65656b2f6c61726176656c2d676f6f676c652d6170692f6c6963656e7365)](https://packagist.org/packages/mrjonleek/laravel-google-api)

Google Places API.
==================

[](#google-places-api)

A **[Laravel/Lumen](https://laravel.com/docs/5.4)** package for working with **Google API Web Services**.

### The following place requests are available:

[](#the-following-place-requests-are-available)

- [Place Search](#place-search) return a list of places based on a user's location or search string.
- [Place Details](#place-details) requests return more detailed information about a specific Place, including user reviews.
- [Place Autocomplete](#place-autocomplete) can be used to automatically fill in the name and/or address of a place as you type.
- [Query Autocomplete](#query-autocomplete) can be used to provide a query prediction service for text-based geographic searches, by returning suggested queries as you type.
- [Place Add](#place-add) can be used to add a place to Google's Place database

Installation
============

[](#installation)

Install it with composer

```
composer require mrjonleek/laravel-google-api

```

Usage
=====

[](#usage)

Step 1
------

[](#step-1)

Set up the service provider and facade in the **config\\app.php**

```
'providers' => [
....
....
Mrjonleek\GoogleApi\Providers\PlacesServiceProvider::class,
];

'aliases' => [
....
....
'GooglePlaces' => Mrjonleek\GoogleApi\Facades\Places::class,
];
```

Step 2
------

[](#step-2)

publish the config file with following artisan command

```
php artisan vendor:publish --provider="Mrjonleek\GoogleApi\Providers\PlacesServiceProvider"

```

This will create **google.php** file in the config directory.

Set the *API KEY* in this config file or in `.env` as **GOOGLE\_API\_KEY**.

Set 3
-----

[](#set-3)

Start using the package using Facade.

```
$response = GooglePlaces::placeAutocomplete('some city');

```

---

Response
========

[](#response)

The response returned is a [Laravel's Collection](https://laravel.com/docs/5.2/collections) so that you can perform any of the available collection methods on it.

Available Methods
=================

[](#available-methods)

Place Search
------------

[](#place-search)

### nearbySearch($location, $radius = null, $params = \[\])

[](#nearbysearchlocation-radius--null-params--)

- `location` — The latitude/longitude around which to retrieve place information. This must be specified as latitude, longitude.
- 'radius' — Defines the distance (in meters) within which to return place results. The maximum allowed radius is 50 000 meters. Note that `radius` must not be included if `rankby=distance` (described under **Optional parameters** below) is specified.
- If `rankby=distance` (described under **Optional parameters** below) is specified, then one or more of `keyword`, `name`, or `types` is required.
- `params` - **Optional Parameters** You can refer all the available optional parameters on the [Google's Official Webpage](https://developers.google.com/places/web-service/search)

### textSearch($query, $params = \[\])

[](#textsearchquery-params--)

- `query` — The text string on which to search, for example: "restaurant". The Google Places service will return candidate matches based on this string and order the results based on their perceived relevance.
- `params` - **Optional Parameters** You can refer all the available optional parameters on the [Google's Official Webpage](https://developers.google.com/places/web-service/search)

### radarSearch($location, $radius, array $params)

[](#radarsearchlocation-radius-array-params)

- `location` — The latitude/longitude around which to retrieve place information. This must be specified as latitude, longitude.
- `radius` — Defines the distance (in meters) within which to return place results. The maximum allowed radius is 50 000 meters.
- `params` - **Optional Parameters** You can refer all the available optional parameters on the [Google's Official Webpage](https://developers.google.com/places/web-service/search)

**Note:** A Radar Search request must include at least one of `keyword`, `name`, or `types`.

---

Place Details
=============

[](#place-details)

### placeDetails($placeId, $params = \[\])

[](#placedetailsplaceid-params--)

- `placeId` — A textual identifier that uniquely identifies a place, returned from a Place Search.
- `params` - **Optional Parameters** You can refer all the available optional parameters on the [Google's Official Webpage](https://developers.google.com/places/web-service/details)

---

Place Autocomplete
==================

[](#place-autocomplete)

### placeAutocomplete($input, $params = \[\])

[](#placeautocompleteinput-params--)

- `input` — The text string on which to search. The Place Autocomplete service will return candidate matches based on this string and order results based on their perceived relevance.
- `params` - **Optional Parameters** You can refer all the available optional parameters on the [Google's Official Webpage](https://developers.google.com/places/web-service/autocomplete)

---

Query Autocomplete
==================

[](#query-autocomplete)

### queryAutocomplete($input, $params = \[\])

[](#queryautocompleteinput-params--)

- `input` — The text string on which to search. The Places service will return candidate matches based on this string and order results based on their perceived relevance.
- `params` - **Optional Parameters** You can refer all the available optional parameters on the [Google's Official Webpage](https://developers.google.com/places/web-service/query)

Place Add
=========

[](#place-add)

### addPlace($params)

[](#addplaceparams)

- `params` - The set of key-value parameters necessary to add a place to Google. You can refer to the fields on [Google's Official Webpage regarding Place Add](https://developers.google.com/places/web-service/add-place)

Additional Methods
==================

[](#additional-methods)

### getStatus()

[](#getstatus)

This will return the status of the response send by google api. Use it after making any request.

### getKey()

[](#getkey)

This will return the `API KEY` been used with the requests.

### setKey($key)

[](#setkeykey)

This will set the `API KEY`.

Contribution
============

[](#contribution)

Feel free to report issues or make Pull Requests. If you find this document can be improved in any way, please feel free to open an issue for it.

License
=======

[](#license)

The Google Places Api is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

3237d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5623625?v=4)[Jonathan Leek](/maintainers/mrjonleek)[@mrjonleek](https://github.com/mrjonleek)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mrjonleek-laravel-google-api/health.svg)

```
[![Health](https://phpackages.com/badges/mrjonleek-laravel-google-api/health.svg)](https://phpackages.com/packages/mrjonleek-laravel-google-api)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[laravel/ai

The official AI SDK for Laravel.

1.0k2.1M163](/packages/laravel-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[simplestats-io/laravel-client

Analytics for Laravel. Track visitors, registrations, and payments. Discover which channels actually drive revenue, not just traffic. Server-side, GDPR compliant, ad-blocker proof.

5019.3k](/packages/simplestats-io-laravel-client)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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