PHP code example of salamwaddah / passport-visa-api

1. Go to this page and download the library: Download salamwaddah/passport-visa-api 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/ */

    

salamwaddah / passport-visa-api example snippets




$passport = \SalamWaddah\PassportVisa\Passport::make('ma');

$passport->get();
// [
//     "visa-free" => ["tr", etc...],
//     "visa-on-arrival" => ["lb", etc...],
//     "electronic-travel-authorization" => ["kr", etc...],
//     "e-visa" => ["jo", etc...],
//     "visa-

// list of visa free countries for your $passport
$passport->listVisaFree(); // returns ["tr", etc...]

// list of countries which do not admit your $passport
$passport->listNotAdmitted(); // returns []