genyaa / shopware-api-sdk
Laravel package for the shopware API.
Installs: 681
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 1
Open Issues: 0
pkg:composer/genyaa/shopware-api-sdk
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.