Laravel Community Tools by Tighten
Laravel Nova icon Nova Packages
L

amap 高德地图

Installation Instructions

nova-amap

Laravel Nova高德地图

Installation

composer require invoice/nova-amap
use Ofancn\Amap\Amap;

public function fields(Request $request) {
        $location = $request->user()->location;
        return [
            ID::make()->sortable(),
            BelongsTo::make(__('用户'), 'user', User::class)->searchable(),
            Text::make(__('名称'), 'name')->sortable()->rules('required', 'string', 'max:255'),
            Amap::make(__('位置'), 'amap')->initLocation($location->latitude ?? 22.56153, $location->longitude ?? 113.4911)->zoom(12)->rules('required', 'json'),
        ];
}
{"lat": 22.097868, "lng": 113.536494, "address": "广东省珠海市香洲区横琴镇环岛东路85珠海长隆海洋王国"}

Readme

nova-amap

Laravel Nova高德地图

#Installation

composer require invoice/nova-amap
use Ofancn\Amap\Amap;

public function fields(Request $request) {
        $location = $request->user()->location;
        return [
            ID::make()->sortable(),
            BelongsTo::make(__('用户'), 'user', User::class)->searchable(),
            Text::make(__('名称'), 'name')->sortable()->rules('required', 'string', 'max:255'),
            Amap::make(__('位置'), 'amap')->initLocation($location->latitude ?? 22.56153, $location->longitude ?? 113.4911)->zoom(12)->rules('required', 'json'),
        ];
}
{"lat": 22.097868, "lng": 113.536494, "address": "广东省珠海市香洲区横琴镇环岛东路85珠海长隆海洋王国"}

FormField

DetailField

Screenshots

Back to Top
Added 6 years ago
Last updated 6 Years Ago
Version 1.1
Composer
invoice/nova-amap
GitHub stars 2
Packagist downloads 79

Favorites

1 user favorited

Rating

2.00
(out of 5)
★★★★★
★★★★
★★★
★★
1 ratings

Author

Contributors

Brought to you by Tighten

Issues/Feature Requests Stats Package Ideas