yuriy-martini/nova-place-field

There is no license information available for the latest version (v0.1.0) of this package.

v0.1.0 2022-12-22 16:12 UTC

This package is not auto-updated.

Last update: 2024-04-26 20:46:05 UTC


README

Latest Version MIT License

Installation

composer require yuriy-martini/nova-place-field

Configuration

Add to .env file GOOGLE_MAPS_PLACES_API_KEY or GOOGLE_MAPS_API_KEY.

GOOGLE_MAPS_API_KEY=
GOOGLE_MAPS_PLACES_API_KEY=${GOOGLE_MAPS_API_KEY}

Usage

use Laravel\Nova\Fields\Country;
use Laravel\Nova\Fields\Text;
use YuriyMartini\NovaPlaceField\Place;

public function fields(Request $request)
{
    return [
        Place::make('Address')
            ->locality('city')
            ->administrativeAreaLevel1('state')
            ->country('country', true),
        
        Text::make('Street Number'),
        
        Text::make('City'),
        
        Text::make('State'),
        
        Text::make('Postal Code'),
        
        Country::make('Country'),
    ];
}

Changelog

Please see Changelog File for more information on what has changed recently.

Testing

composer test

License

The MIT License (MIT). Please see License File for more information.