承接 webapix/laravel-mygls 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

webapix/laravel-mygls

最新稳定版本:v3.0.0

Composer 安装命令:

composer require webapix/laravel-mygls

包简介

Laravel version of the MyGLS REST API integration.

README 文档

README

Tests StyleCI MIT Licensed

This is the Laravel version of our MyGLS REST API integration.

Installation

You can install the package via composer:

composer require webapix/laravel-mygls

Configuration

Publish package

Create config/my-gls.php configuration file using the following artisan command:

php artisan vendor:publish --provider="Webapix\GLS\Laravel\MyGlsServiceProvider"

Add your account

Open .env file and set:

MYGLS_API_URL
MYGLS_CLIENT_NUMBER
MYGLS_USERNAME
MYGLS_PASSWORD

Usage

use \Webapix\GLS\Requests\GetParcelStatuses;

$request = new GetParcelStatuses(12345678);

/** @var \Webapix\GLS\Responses\GetParcelStatuses $response */
$response = app(\Webapix\GLS\Laravel\Client::class)->request($request);
// Or use the facade: $response = MyGls::request($request);

if ($response->successfull()) {

    /** @var \Webapix\GLS\Models\ParcelStatus[] */
    $parcelStatusList = $response->parcelStatusList();

    foreach ($parcelStatusList as $parcelStatus) {
        $parcelStatus->depotCity();
        $parcelStatus->depotNumber();
        $parcelStatus->statusCode();
        $parcelStatus->statusDate();
        $parcelStatus->statusDescription();
        $parcelStatus->statusInfo();
    }

}

You can find more information and examples in our wiki.

Accounts

By default, the MyGLS client use the default account.

You can use multiple accounts:

// add your new account to config/my-gls.php
[
    'accounts' => [
        'my-new-account' => [
            'api_url' => '',
            'client_number' => '',
            'username' => '',
            'password' => '',
        ]
    ]
]

MyGls::on('my-new-account')->request(...);

Docs

Package docs
Official GLS Docs

Testing

composer test

Postcardware

According to the postcardware concept, if you use the software for your project(s) we would appreciate to receive a postcard of your hometown.

Please send it to:

WEBAPIX KFT. Kőris utca 2/E, 2/1
2051 Biatorbágy
Hungary

Support us

If you find our packages useful and would like to support our work in maintaining and regularly updating them, consider becoming a patron. Any size of donation is welcome and highly appreciated.

Contributing

Contributions are welcome! When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Security

If you discover any security related issues, please email pdo@webapix.hu instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 23.47k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 15
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 15
  • Watchers: 2
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-09-15