team-nifty-gmbh / laravel-shopware
Laravel integration for the Shopware 6 Admin API SDK
Package info
github.com/Team-Nifty-GmbH/laravel-shopware
pkg:composer/team-nifty-gmbh/laravel-shopware
dev-main
2026-03-24 07:50 UTC
Requires
- php: ^8.1
- illuminate/support: ^12.0|^13.0
- team-nifty-gmbh/shopware-sdk: dev-main
Requires (Dev)
- laravel/pint: ^1.0
- orchestra/testbench: ^10.0|^11.0
- pestphp/pest: ^3.8
- pestphp/pest-plugin-laravel: ^3.1
This package is auto-updated.
Last update: 2026-03-24 07:50:37 UTC
README
Laravel integration for the Shopware 6 Admin API SDK.
Provides a ServiceProvider, Facade, config, and global helper for seamless Shopware 6 API access in Laravel applications.
Installation
composer require team-nifty-gmbh/laravel-shopware
The ServiceProvider is auto-discovered. Publish the config:
php artisan vendor:publish --tag=shopware-config
Configuration
Add to your .env:
SHOPWARE_BASE_URL=https://your-shop.example.com/api SHOPWARE_CLIENT_ID=your-client-id SHOPWARE_CLIENT_SECRET=your-client-secret
Usage
Via Helper
// Get all products $products = shopware6()->product()->getProductList(); // Create a product $response = shopware6()->product()->createProduct([ 'name' => 'My Product', 'productNumber' => 'SW-001', 'stock' => 100, 'taxId' => '...', 'price' => [['currencyId' => '...', 'gross' => 19.99, 'net' => 16.80, 'linked' => true]], ]); // Search with criteria use TeamNiftyGmbH\Shopware\Support\CriteriaBuilder; $criteria = CriteriaBuilder::make() ->equals('active', true) ->contains('name', 'shirt') ->sort('name') ->limit(10) ->association('manufacturer') ->toArray(); $results = shopware6()->product()->searchProduct($criteria);
Via Facade
use TeamNiftyGmbH\LaravelShopware\Facades\Shopware; $order = Shopware::order()->getOrder($orderId);
Via Dependency Injection
use TeamNiftyGmbH\Shopware\Shopware; class OrderSyncService { public function __construct( protected Shopware $shopware, ) {} public function syncOrders(): void { $orders = $this->shopware->order()->getOrderList(); // ... } }