Laravel-Post-PLC

所属分类:单片机开发
开发工具:PHP
文件大小:0KB
下载次数:0
上传日期:2024-01-01 00:42:23
上 传 者sh-1993
说明:  奥地利邮政标签中心(sterreichische Post)的Laravel集成。
(A Laravel integration for the Austrian Post Label Center ( sterreichische Post).)

文件列表:
config/
database/
resources/views/
src/
tests/
workbench/app/Providers/
.editorconfig
CHANGELOG.md
LICENSE.md
composer.json
phpstan-baseline.neon
phpstan.neon.dist
phpunit.xml.dist

# A laravel integration for the Austrian Post Label Center (sterreichische Post). [![Latest Version on Packagist](https://img.shields.io/packagist/v/alexanderpoellmann/laravel-post-plc.svg?style=flat-square)](https://packagist.org/packages/alexanderpoellmann/laravel-post-plc) [![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/alexanderpoellmann/laravel-post-plc/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/alexanderpoellmann/laravel-post-plc/actions?query=workflow%3Arun-tests+branch%3Amain) [![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/alexanderpoellmann/laravel-post-plc/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/alexanderpoellmann/laravel-post-plc/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain) [![Total Downloads](https://img.shields.io/packagist/dt/alexanderpoellmann/laravel-post-plc.svg?style=flat-square)](https://packagist.org/packages/alexanderpoellmann/laravel-post-plc) ## Installation You can install the package via composer: ```bash composer require alexanderpoellmann/laravel-post-plc ``` You can publish and run the migrations with: ```bash php artisan vendor:publish --tag="laravel-post-plc-migrations" php artisan migrate ``` You can publish the config file with: ```bash php artisan vendor:publish --tag="laravel-post-plc-config" ``` Finally, add the following entry to your `services.php` config file: ```php 'post-plc' => [ 'client-id' => env('PLC_CLIENT_ID'), 'org-unit-id' => env('PLC_ORG_UNIT_ID'), 'org-unit-guid' => env('PLC_ORG_UNIT_GUID'), 'sandbox' => env('PLC_SANDBOX', false), ], ``` ## Usage ```php use AlexanderPoellmann\LaravelPostPlc\Classes\Address; use AlexanderPoellmann\LaravelPostPlc\Classes\Collo; use AlexanderPoellmann\LaravelPostPlc\Classes\Shipment; use AlexanderPoellmann\LaravelPostPlc\Facades\LaravelPostPlc; $from = (new Address()) ->id(sprintf('%05d', mt_rand(1, 10000))) ->name('Absender GmbH') ->route('Rochusmarkt') ->street_number('5') ->post_code('1030') ->city('Wien') ->country_code('AT') ->get(); $to = (new Address()) ->id(sprintf('%05d', mt_rand(1, 10000))) ->name('Musterfirma GmbH', 'c/o Frau Maria Muster') ->route('Landesgerichtsstrae') ->street_number('1') ->post_code('1010') ->city('Wien') ->country_code('AT') ->get(); $shipment = (new Shipment()) ->withPrinter() ->withNumber(sprintf('%05d', mt_rand(1, 10000))) ->using(PostProductCodes::PaketPremiumOesterreichB2B) ->from($from) ->to($to) ->parcels([ (new Collo())->weight(0.4)->get(), (new Collo())->weight(5.2)->get(), ])->get(); LaravelPostPlc::call(ServiceMethods::ImportShipment, $shipment, true); $object = LaravelPostPlc::toCollection(); dd($object); ``` ## Testing ```bash composer test ``` ## Changelog Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently. ## Contributing Please see [CONTRIBUTING](CONTRIBUTING.md) for details. ## Security Vulnerabilities Please review [our security policy](../../security/policy) on how to report security vulnerabilities. ## Credits - [Alexander Manfred Pllmann](https://github.com/AlexanderPoellmann) - [All Contributors](../../contributors) ## License The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

近期下载者

相关文件


收藏者