Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 1.03 KB

README.md

File metadata and controls

36 lines (24 loc) · 1.03 KB

Country EU Check

Packagist Version Packagist Downloads License

Checks whether a given country is a member of the European Union.

Installation

You can install the package via composer.

composer require doncamillo11/country-eu-check

Usage

To check if a country is a member state of the European Union, checkEuMembership method. You can pass an ISO 3166 country code or a country name to the method.

use DonCamillo11\CountryEuCheck\CountryEuCheck;

CountryEuCheck::checkEuMembership('DE'); // true
CountryEuCheck::checkEuMembership('CH'); // false

or

use DonCamillo11\CountryEuCheck\CountryEuCheck;

CountryEuCheck::checkEuMembership('Germany'); // true
CountryEuCheck::checkEuMembership('Switzerland'); // false

License

CountryEUCheck is open-sourced software licensed under the MIT license.