team-nifty-gmbh/laravel-shopware

Laravel integration for the Shopware 6 Admin API SDK

Maintainers

Package info

github.com/Team-Nifty-GmbH/laravel-shopware

Homepage

pkg:composer/team-nifty-gmbh/laravel-shopware

Statistics

Installs: 13

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-main 2026-03-24 07:50 UTC

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();
        // ...
    }
}