genyaa / shopware-api-sdk
This package is abandoned and no longer maintained.
The author suggests using the sas/shopware-laravel-sdk package instead.
Laravel package for the shopware API.
v0.8.8
2021-07-08 21:29 UTC
Requires
- php: ^8.0
- guzzlehttp/guzzle: ^7.2
- illuminate/contracts: ^8.29
- illuminate/support: ^8.29
- nesbot/carbon: ^2.45
Requires (Dev)
- barryvdh/laravel-ide-helper: ^2.9
- orchestra/testbench: ^6.0
- phpunit/phpunit: ^9.5
README
This package provides an SDK for Laravel to connect to Shopware 6 default API scheme.
This package is a WIP and will be updated on the main branch until stable.
How to setup
Publish config file:
php artisan vendor:publish --provider="GeNyaa\ShopwareApiSdk\ShopwareApiSdkServiceProvider" --tag="config"
Initial client:
$client = app(\GeNyaa\ShopwareApiSdk\ShopwareApiClient::class);
Helper functions
shopwareCollect(string $resource, mixed $value = null)
Creates a resource collection of Resource(s).
Example usage:
use GeNyaa\ShopwareApiSdk\Dto\Resources\Category; shopwareCollect(Category::class, []);
shopwareCustomFields(array $value = []): CustomFields
Creates a CustomFields class from array.
Example usage:
shopwareCustomFields([ 'fieldName' => 'fieldValue', ]);
shopwareParameters(array $value = []): Parameters
Creates a Parameters class from array.
Example usage:
shopwareParameters([ 'parameterName' => 'parameterValue', ]);
shopwareHeader(array $value = []): Header
Creates a Header class from array.
Example usage:
shopwareHeader([ 'headerName' => 'headerValue', ]);
shopwareUuid(): string
Generates a Uuid to Shopware spec.