承接 aboleon/metaframework-google-places 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

aboleon/metaframework-google-places

Composer 安装命令:

composer require aboleon/metaframework-google-places

包简介

Google Places address autocomplete component for Laravel

README 文档

README

Tests codecov Latest Version on Packagist Total Downloads PHP Version License

Google Places address autocomplete component for Laravel

Requirements

  • PHP ^8.3
  • Laravel ^11.0 | ^12.0
  • MetaFramework Inputable

Installation

composer require aboleon/metaframework-google-places

Publish assets/config/translations:

php artisan vendor:publish --tag=mfw-google-places-config
php artisan vendor:publish --tag=mfw-google-places-translations
php artisan vendor:publish --tag=mfw-google-places-assets

Configuration

config/mfw-google-places.php:

return [
    'google' => [
        'places_api_key' => env('MFW_GOOGLE_PLACES_KEY', ''),
    ],
];

Usage

<x-mfw-google-places::form
    :model="$address"
    field="address"
    label="Address"
    :params="['required' => ['route', 'postal_code', 'locality']]"
    :hidden="['administrative_area_level_2']"
    :showCoords="true"
/>

Searchbar-only mode:

<x-mfw-google-places::form
    :model="$address"
    mode="searchbar"
/>

Custom search filters (Places API)

You can pass Places Autocomplete options through params. The component supports:

  • types (legacy; mapped to includedPrimaryTypes)
  • includedPrimaryTypes
  • includedSecondaryTypes
  • includedRegionCodes (or legacy componentRestrictions.country)

Example: keep address results and also allow hotels/lodging:

<x-mfw-google-places::form
    :model="$address"
    :params="[
        'types' => ['geocode'],
        'includedPrimaryTypes' => ['lodging'],
    ]"
/>

To fully customize, publish the component and use the native Blade tag:

<x-google-places />

Artisan Commands

php artisan mfw-google-places:make-geo-model
php artisan mfw-google-places:make-geo-for-model {model?}
php artisan mfw-google-places:publish-component [--force]
php artisan mfw-google-places:publish-request [--force]
  • mfw-google-places:make-geo-model generates a new Geo model and migration with all Google Places fields.
  • mfw-google-places:make-geo-for-model adds a Google Places Geo relation and migration to an existing model (optionally provide the model class).
  • mfw-google-places:publish-component publishes app/View/Components/GooglePlaces.php and resources/views/components/google-places.blade.php for customization (use --force to overwrite).
  • mfw-google-places:publish-request publishes a GooglePlacesRequest to app/Http/Requests for customization (use --force to overwrite).

Validation example:

use MetaFramework\GooglePlaces\Validation\GoogleAddressValidation;

$rules = (new GoogleAddressValidation())
    ->setPrefix('address')
    ->setRequiredFields(['route', 'postal_code', 'locality'])
    ->rules();

Customize the published request:

php artisan mfw-google-places:publish-request
// app/Http/Requests/GooglePlacesRequest.php
public function rules(): array
{
    return (new GoogleAddressValidation())
        ->setPrefix('address')
        ->setRequiredFields(['route', 'postal_code', 'locality'])
        ->rules();
}

aboleon/metaframework-google-places 适用场景与选型建议

aboleon/metaframework-google-places 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 32 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 01 月 28 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 aboleon/metaframework-google-places 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 aboleon/metaframework-google-places 我们能提供哪些服务?
定制开发 / 二次开发

基于 aboleon/metaframework-google-places 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 32
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 30
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-28