A Laravel package for working with Countries.
composer require dcblogdev/laravel-countries
In Laravel 5.5 the service provider will automatically get registered. In older versions of the framework just add the service provider in config/app.php file:
'providers' => [ // ... Dcblogdev\Countries\CountriesServiceProvider::class, ];
In a controller import the class:
In a view or closure call the facade:
This will return an object of countries