PHP code example of jeandepaula / country-validations
1. Go to this page and download the library: Download jeandepaula/country-validations library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jeandepaula / country-validations example snippets
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use CountryValidations\CountryValidator;
class CountryValidationsServiceProvider extends ServiceProvider
{
public function register()
{
$this->app->singleton('country-validator', function () {
return new CountryValidator();
});
}
public function boot()
{
//
}
}
'providers' => [
// Other Service Providers...
App\Providers\CountryValidationsServiceProvider::class,
],