Skip to content

A package for Laravel Nova with the ability to screen by continent.

License

Notifications You must be signed in to change notification settings

enmaboya/nova-country-select

Repository files navigation

Country Select for Laravel Nova

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

  1. only - only countries from the list will be displayed

use Enmaboya\CountrySelect\CountrySelect;
   
CountrySelect::make('Country', 'county_code')->only(['US', 'RU'])
  1. except - excludes countries from the list

use Enmaboya\CountrySelect\CountrySelect;
   
CountrySelect::make('Country', 'county_code')->except(['BY', 'CN'])
  1. onlyContinents - only сontinents from the list will be displayed

use Enmaboya\CountrySelect\CountrySelect;
  
CountrySelect::make('Country', 'county_code')->onlyContinents(['EU', 'AS'])
  1. exceptContinents - excludes сontinents from the list

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.

About

A package for Laravel Nova with the ability to screen by continent.

Resources

License

Stars

Watchers

Forks

Packages

No packages published