rosolovsky / moonshine-gmap-field
Google Map field for MoonShine 4
Package info
github.com/rosolovsky/moonshine-gmap-field
Language:Blade
pkg:composer/rosolovsky/moonshine-gmap-field
v1.0.2
2026-02-04 14:18 UTC
Requires
- php: ^8.2
Requires (Dev)
- moonshine/moonshine: 4.0
README
Google Maps field for MoonShine v4.
Installation
composer require rosolovsky/moonshine-gmap-field
Publish config
php artisan vendor:publish --tag=moonshine-gmap-config
Config
return [ 'api_key' => '', // Your Google Map API Key 'language' => 'en', // Your language 'default_latitude' => 0, // Set default latitude here 'default_longitude' => 0, // Set default longitude here ];
Usage
As example 'location' column in table.
In model add:
protected $casts = [
'location' => 'array'
];
use Rosolovsky\MoonshineGmapField\Fields\Gmap;
Gmap::make('Location', 'location')
->zoom(8)
->maxZoom(18)
->minZoom(5),