laravel-xentral-orders-parser maintained by drei-d
Laravel Xentral Orders Parser
Requirements
- Laravel 11 or higher
- PHP 8.2 or higher
- ext-simplexml enabled
Setup
This package is available on Packagist via Composer and can be installed with the following command:
composer require drei-d/laravel-xentral-orders-parser
Usage
Once installed, you can parse a file using the OrderParserService:
$orderDto = app(\DREID\LaravelXentralOrdersParser\Services\OrderParserService::class)->parseFromDisk(
'<disk>',
'<filepath>'
);
You can also just parse the xml content without reading it from a file beforehand:
$orderDto = app(\DREID\LaravelXentralOrdersParser\Services\OrderParserService::class)->parse('<xml>');
That's already it. You're good to go. Enjoy!