michelmelo/dpd-track-trace

DPD 跟踪(葡萄牙邮政)对 PHP 的跟踪。

1.0.4 2020-04-09 15:31 UTC

This package is auto-updated.

Last update: 2024-09-10 00:53:41 UTC


README

DPD 跟踪(葡萄牙邮政)对 PHP 的跟踪。

使用 DPD 服务(葡萄牙邮政)跟踪邮件和包裹 https://dpd.pt/track-and-trace

要求

PHP 5.6 或更高版本。

安装

将此添加到您的 composer.json 文件中,在 require 对象内

"michelmelo/dpd-track-trace": "1.0.*"

之后,运行 composer install 安装包。将服务提供者添加到 config/app.php 中的 providers 数组。

'providers' => array(
    // ...
    michelmelo\dpdtracking\DpdTrackingServiceProvider::class,
)

发布配置文件。

php artisan vendor:publish

用法

use michelmelo\dpdtracking\DpdTracking;

$dpd = new DpdTracking();
$res = $dpd->trackObjects(['09711514666666V', 'LX123456789PT']);
var_dump($res);
/*
output:
array:1 [
  "09711514666666V" => array:11 [
    0 => array:5 [
      0 => "410"
      1 => "2020/04/06 09:32"
      2 => "Envio em armazém"
      3 => ""
      4 => ""
    ]
    1 => array:5 [
      0 => "403"
      1 => "2020/04/04 18:27"
      2 => "Retorno armazém (pára AEP)"
      3 => ""
      4 => ""
    ]
  ]
]
*/

变更日志

  • 初始发布

贡献

  • 欢迎讨论错误、功能和想法。

许可

michelmelo/dpd-track-trace 是在 MIT 许可下发布的。

您可以自由使用、修改和分发此软件