PHP code example of tapp / select-country-code

1. Go to this page and download the library: Download tapp/select-country-code 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/ */

    

tapp / select-country-code example snippets


use Tapp\SelectCountryCode\SelectCountryCode;

SelectCountryCode::make(__('Country Code')),

SelectCountryCode::make(__('Country Code'))
    ->iconsDirectory('/public/path/to/icons'),

SelectCountryCode::make(__('Country Code'))
    ->iconsFormat('png'),

[
    ['label' => 'Afghanistan', 'country_code' => '+93', 'iso_code' => 'AF'],
    ['label' => 'Albania', 'country_code' => '+355', 'iso_code' => 'AL'],
    // ...
]

SelectCountryCode::make(__('Country Code'))
    ->options($optionsArray),
bash
php artisan vendor:publish --tag=public --force