Download the PHP package vovanmix/google-places-api without Composer

On this page you can find all versions of the php package vovanmix/google-places-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package google-places-api

This fork

This is a fork of https://github.com/SachinAgarwal1337/google-places-api.

I added model classes for results, API to retrieve photos, and caching.

Google Places APi.

This is a PHP wrapper for Google Places Api Web Service. And is Laravel Framework friendly.

About Package

With just 2 lines of code you can request to any google places api feature. No need to manually perform any curl requests.

The following place requests are available:

Installation

Install it with composer

Usage

Laravel user can see the Laravel Usage section

Step 1 - Import the class using namespace

Step 2 - Initiate the object

Note: You can also set the API KEY after initaiting the class using setKey('KEY') method. You can chain this with method with anyother methods.

Step 3 - Start Using the Api.

Example:

As mentioned earlier just 2 lines of code to make any request.

Full example:


Use with Laravel

Step 1

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

Step 2

publish the config file with following artisan command

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

Set the API KEY in this config file.

Set 3

Start using the package using Facade.


Response

The response returned is a Laravel's Collection so that you can perform any of the available collection methods on it.

If you are not familiar with Laravel's Collecton you can either reference the docs here or you can use response as simple array.

Available Methods

Place Search

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

textSearch($query, $params = [])

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

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


Place Details

placeDetails($placeId, $params = [])


Place Autocomplete

placeAutocomplete($input, $params = [])


Query Autocomplete

queryAutocomplete($input, $params = [])

Additional Methods

getStatus()

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

getKey()

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

setKey($key)

This will set the API KEY.

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

The Google Places Api is open-sourced software licensed under the MIT license


All versions of google-places-api with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
laravel/framework Version ~5.0
illuminate/support Version ~5.0
illuminate/container Version ~5.0
guzzlehttp/guzzle Version ^6.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package vovanmix/google-places-api contains the following files

Loading the files please wait ....