PHP code example of sonko-dmitry / travelpayouts

1. Go to this page and download the library: Download sonko-dmitry/travelpayouts 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/ */

    

sonko-dmitry / travelpayouts example snippets


 use SonkoDmitry\travelpayouts\widgets\SubscriptionWidget;
 

 <?= SubscriptionWidget::widget([
     'backgroundColor' => '#00b1dd',
     'originIata' => 'PEE',
     'originName' => 'Пермь',
     'destinationIata' => 'MOW',
     'destinationName' => 'Москва',
     'marker' => '12345',
     'powered_by' => true,
 ]) 

'travelpayouts' => [
    'class' => 'SonkoDmitry\travelpayouts\Travelpayouts',
    'token' => '12345',
    //'useLocalData' => false, //you can change this property globally for all data components, if you want use only remote data for examle
],

$countries = Yii::$app->travelpayouts->data->countries;


 $ php composer.phar