定制 abr4xas/gmaps-input-backpack 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

abr4xas/gmaps-input-backpack

最新稳定版本:v2.0.0

Composer 安装命令:

composer require abr4xas/gmaps-input-backpack

包简介

Custom Google Maps Input for Laravel Backpack

README 文档

README

Custom Google Maps Input for Laravel Backpack

How to install

with composer:

composer require abr4xas/gmaps-input-backpack

How to use

Add your Google Api Key to the env file:

GOOGLE_MAPS_API_KEY=

Add this to your backpack controller:

$this->crud->addField([
    'name'  => 'address-input', // do not change this
    'type'  => 'customGoogleMaps', // do not change this
    'label' => "Google Maps",
    'hint'  => 'Help text',
    'attributes' => [
        'class' => 'form-control map-input', // do not change this, add more classes if needed
    ],
    'view_namespace' => 'custom-google-maps-field-for-backpack::fields',
]);

Notice the view_namespace attribute - make sure that is exactly as above, to tell Backpack to load the field from this addon package, instead of assuming it's inside the Backpack\CRUD package.

Preview:

Custom Google Maps Input for Laravel Backpack

Thanks to https://laraveldaily.com/laravel-find-addresses-with-coordinates-via-google-maps-api/ for the inspiration.

统计信息

  • 总下载量: 3.76k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 0
  • Forks: 4
  • 开发语言: Blade

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-08-10