enmaboya / country-select
A Laravel Nova field.
1.0
2021-09-07 12:29 UTC
Requires
- php: >=7.1.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
This package provides a customizable select field.
Installation
composer require enmaboya/country-select
Basic usage
use Enmaboya\CountrySelect\CountrySelect; CountrySelect::make('Country', 'county_code')
Available settings
use Enmaboya\CountrySelect\CountrySelect; CountrySelect::make('Country', 'county_code')->only(['US', 'RU'])
use Enmaboya\CountrySelect\CountrySelect; CountrySelect::make('Country', 'county_code')->except(['BY', 'CN'])
use Enmaboya\CountrySelect\CountrySelect; CountrySelect::make('Country', 'county_code')->onlyContinents(['EU', 'AS'])
use Enmaboya\CountrySelect\CountrySelect; CountrySelect::make('Country', 'county_code')->exceptContinents(['SA', 'NA', 'OC'])
Available list of continents:
- AF - Africa
- AS - Asia
- EU - Europe
- NA - North America
- OC - Oceania
- SA - South America
Make the field dependent
You can make this field dependent and use it together with the "Laravel Nova Place Input field".
In this case the search will be limited to the country selected in the "Select Country field".
License
The MIT License (MIT). Please see License File for more information.