PHPackages                             puwnz/google-maps-package - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. puwnz/google-maps-package

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

puwnz/google-maps-package
=========================

Laravel wrapper around google maps library.

01PHP

Since Jun 23Pushed 5y ago1 watchersCompare

[ Source](https://github.com/PuwnZ/google-maps-package)[ Packagist](https://packagist.org/packages/puwnz/google-maps-package)[ RSS](/packages/puwnz-google-maps-package/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Google Maps Package
===================

[](#google-maps-package)

Overview
--------

[](#overview)

The Google Maps Lib project provides a Google Map Lib integration for you Laravel 6+ and PHP 7.3+ project. At this time, just geocode is enable in this lib, because my needs is only on this part, but you can open [issues](/issues) to push your needs.

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

[](#installation)

To install this lib you can just use composer :

```
composer require puwnz/google-maps-package

```

Integration
-----------

[](#integration)

### Package registration

[](#package-registration)

#### Add Google Maps environment variable

[](#add-google-maps-environment-variable)

Edit your .env file (at the root folder of your laravel project) and add your google maps api key, log file, and http version to communicate with google.

```
GOOGLE_MAPS_API_KEY=MyApiKey
GOOGLEMAPS_LOG_FILE=./storage/log/geocode.log # optional
GOOGLE_MAPS_HTTP_VERSION=2.0 # optional

```

#### Configure your laravel providers to use this wrapper

[](#configure-your-laravel-providers-to-use-this-wrapper)

Edit config/app.php and add in providers section:

```
 'providers' => [
        // the other Provider
        /*
         * Package Service Providers...
         */
        \Puwnz\GoogleMapsPackage\GoogleMapsServiceProvider::class,
    ],
```

### How to use this wrapper

[](#how-to-use-this-wrapper)

You can inject it directly in your Controller like this:

```
