PHP code example of enan / pathao-courier

1. Go to this page and download the library: Download enan/pathao-courier 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/ */

    

enan / pathao-courier example snippets


// add below line in the providers array
Enan\PathaoCourier\PathaoCourierServiceProvider::class,


// add below line in the alias array
'PathaoCourier' => Enan\PathaoCourier\Facades\PathaoCourier::class,

use Enan\PathaoCourier\Facade\PathaoCourier;

/**
 * To Get the days left of token expiration
 * You'll get the expected date of the expiration and total days left
 *
 * @type <GET>
 */
PathaoCourier::GET_ACCESS_TOKEN_EXPIRY_DAYS_LEFT();

/**
 * To Get the cities
 *
 * @type <GET>
 */
PathaoCourier::GET_CITIES();

/**
 * To Get the Zones
 * @type <GET>
 *
 * @param int $city_id
 */
PathaoCourier::GET_ZONES(int $city_id);

/**
 * To Get the Areas
 * @type <GET>
 *
 * @param int $zone_id
 */
PathaoCourier::GET_AREAS(int $zone_id);

/**
 * To Get the Stores
 * @type <GET>
 *
 * @param int $page
 * $page param is optional. If you want you can implement pagination here.
 */
PathaoCourier::GET_STORES(int $page);

/**
 * To Create Store
 * @type <POST>
 * Pass below mentioned parameter
 *
 * @param $name <pient_zone   <
 * @param $item_weight <
bash
php artisan vendor:publish --tag="pathao-courier-config"
bash
php artisan migrate
bash
php artisan set:pathao-courier