This package provides a customisable field with a city/country/place of interest search.
Powered by Nominatim.
composer require enmaboya/place-input
use Enmaboya\PlaceInput\PlaceInput;
PlaceInput::make('some_place')
use Enmaboya\PlaceInput\PlaceInput;
PlaceInput::make('some_place')->onlyCities()
use Enmaboya\PlaceInput\PlaceInput;
PlaceInput::make('some_place')->onlyCountries()
use Enmaboya\PlaceInput\PlaceInput;
PlaceInput::make('some_place')->onlyStates()
use Enmaboya\PlaceInput\PlaceInput;
PlaceInput::make('some_place')->onlyCounties()
use Enmaboya\PlaceInput\PlaceInput;
PlaceInput::make('some_place')->byPostalCode()
use Enmaboya\PlaceInput\PlaceInput;
PlaceInput::make('some_place')->continents(['NA', 'SA'])
Available list of continents:
- AF - Africa
- AS - Asia
- EU - Europe
- NA - North America
- OC - Oceania
- SA - South America
use Enmaboya\PlaceInput\PlaceInput;
PlaceInput::make('some_place')->countries(['RU', 'US', 'CN', 'JP'])
-
dependOnCountrySelect - If you use the County Select field, the search will be restricted to the country selected in County Select.
use Enmaboya\CountrySelect\CountrySelect;
use Enmaboya\PlaceInput\PlaceInput;
CountrySelect::make('Country', 'county_code');
PlaceInput::make('some_place')->dependOnCountrySelect('county_code'),
The MIT License (MIT). Please see License File for more information.