https://github.com/yieldstudio/nova-google-polygon
A Laravel Nova Google polygon field.
https://github.com/yieldstudio/nova-google-polygon
area google laravel map nova polygon
Last synced: 28 days ago
JSON representation
A Laravel Nova Google polygon field.
- Host: GitHub
- URL: https://github.com/yieldstudio/nova-google-polygon
- Owner: YieldStudio
- License: mit
- Created: 2022-08-31T00:29:06.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-21T08:00:08.000Z (over 1 year ago)
- Last Synced: 2025-09-08T14:51:29.323Z (28 days ago)
- Topics: area, google, laravel, map, nova, polygon
- Language: PHP
- Size: 2.36 MB
- Stars: 5
- Watchers: 2
- Forks: 9
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Nova Google Polygon Field
[](https://github.com/yieldstudio/nova-google-polygon/releases)
[](https://packagist.org/packages/yieldstudio/nova-google-polygon)This package allows you to add a Google Map polygon editor on your Laravel Nova resources.

## Requirements
- PHP **8.1+**
- Laravel Nova **4.0+**
- Laravel Framework **8.0+**## Installation
You can install the package in to a Laravel app that uses Nova via composer:
```bash
composer require yieldstudio/nova-google-polygon
```Publish config file (optional):
```shell
php artisan vendor:publish --provider="YieldStudio\NovaGooglePolygon\FieldServiceProvider"
```Create an app and enable Places API and create credentials to get your API key
[https://console.developers.google.com](https://console.developers.google.com)Add the below to your `.env` file
```shell
NOVA_GOOGLE_POLYGON_API_KEY=############################
NOVA_GOOGLE_POLYGON_CENTER_LAT=48.858361
NOVA_GOOGLE_POLYGON_CENTER_LNG=2.336164
```## Usage
Add the use declaration to your resource and use the fields:
```php
use YieldStudio\NovaGooglePolygon\GooglePolygon;
// ....GooglePolygon::make('Delivery area'),
```## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
### Security
If you've found a bug regarding security please mail [contact@yieldstudio.fr](mailto:contact@yieldstudio.fr) instead of using the issue tracker.
## Credits
- [James Hemery](https://github.com/jameshemery) - Developer
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.