PHPackages                             laravel-shirtigo/wrapper - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. laravel-shirtigo/wrapper

ActiveLibrary[API Development](/categories/api)

laravel-shirtigo/wrapper
========================

Laravel wrapper for the Shirtigo PHP API SDK

0.2.0(6mo ago)04GPL-3.0PHPPHP ^8.1

Since Oct 14Pushed 6mo agoCompare

[ Source](https://github.com/webkult/Shirtigo-Api-Laravel-Package)[ Packagist](https://packagist.org/packages/laravel-shirtigo/wrapper)[ RSS](/packages/laravel-shirtigo-wrapper/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (9)Versions (3)Used By (0)

Laravel Shirtigo Wrapper
========================

[](#laravel-shirtigo-wrapper)

A Laravel wrapper for the Shirtigo PHP API SDK that simplifies the integration of Shirtigo services into Laravel applications.

Installation
------------

[](#installation)

```
composer require laravel-shirtigo/wrapper
```

Configuration
-------------

[](#configuration)

Publish the configuration file:

```
php artisan vendor:publish --tag=shirtigo-config
```

Configure your environment variables in the `.env` file:

```
SHIRTIGO_API_KEY=your_api_key_here
SHIRTIGO_BASE_URL=https://cockpit.shirtigo.com/api/
SHIRTIGO_CACHE_ENABLED=true
SHIRTIGO_CACHE_TTL=3600
SHIRTIGO_RETRY_ATTEMPTS=3
SHIRTIGO_LOGGING_ENABLED=true
```

Usage
-----

[](#usage)

### Using the Facade

[](#using-the-facade)

```
use LaravelShirtigo\Facades\Shirtigo;

// Get all orders
$orders = Shirtigo::orders()->getAll();

// Get single order
$order = Shirtigo::orders()->get('ORDER-123');

// Get all products
$products = Shirtigo::products()->getAll();

// Create design
$design = Shirtigo::designs()->createFromFile('/path/to/design.png');
```

### Service Injection

[](#service-injection)

```
use LaravelShirtigo\Contracts\ShirtigoServiceInterface;

class OrderController extends Controller
{
    public function __construct(
        private ShirtigoServiceInterface $shirtigo
    ) {}

    public function index()
    {
        $orders = $this->shirtigo->orders()->getAll();
        return view('orders.index', compact('orders'));
    }
}
```

API Services
------------

[](#api-services)

### Order Service

[](#order-service)

```
// Get all orders
$orders = Shirtigo::orders()->getAll(
    page: 1,
    filter: 1, // Status filter
    items: 50,
    search: 'search term'
);

// Create order
$order = Shirtigo::orders()->create([
    'customer' => [...],
    'products' => [...],
    'delivery_address' => [...]
]);

// Cancel order
Shirtigo::orders()->cancel('ORDER-123');

// Retry payment
Shirtigo::orders()->retryPayment('ORDER-123');
```

### Product Service

[](#product-service)

```
// Get all products
$products = Shirtigo::products()->getAll();

// Create product
$product = Shirtigo::products()->create([
    'name' => 'T-Shirt',
    'description' => 'A cool T-Shirt',
    'base_product_id' => 123
]);

// Update product
Shirtigo::products()->update(123, [
    'name' => 'Updated Name'
]);
```

### Design Service

[](#design-service)

```
// Create design from file
$design = Shirtigo::designs()->createFromFile('/path/to/design.png', [
    'name' => 'My Design'
]);

// Create design from URL
$design = Shirtigo::designs()->createFromUrl('https://example.com/design.png');

// Create design from Base64
$design = Shirtigo::designs()->createFromBase64($base64Data);
```

### Image Service

[](#image-service)

```
// Generate mockup images
$mockups = Shirtigo::images()->generateMockupImages([
    'product_id' => 123,
    'design_id' => 456
]);

// Remove background
$result = Shirtigo::images()->removeBackground([
    'image_url' => 'https://example.com/image.png'
]);
```

Models
------

[](#models)

The wrapper provides Eloquent-like models for API responses:

```
use LaravelShirtigo\Models\Order;

$order = Order::fromArray($orderData);

echo $order->getReference();
echo $order->getTotalPrice();
echo $order->isPaid() ? 'Paid' : 'Not paid';

$products = $order->getProducts();
foreach ($products as $product) {
    echo $product->getQuantity() . 'x ' . $product->getColor();
}
```

Artisan Commands
----------------

[](#artisan-commands)

### Sync products

[](#sync-products)

```
php artisan shirtigo:sync-products --limit=100 --force
```

### Sync orders

[](#sync-orders)

```
php artisan shirtigo:sync-orders --status=1 --limit=50 --page=1
```

Caching
-------

[](#caching)

The wrapper supports automatic caching of API responses:

```
// Caching is enabled by default
$products = Shirtigo::products()->getAll(); // Will be cached

// Disable cache for specific request
$products = Shirtigo::products()->getAll(); // Without cache
```

Error Handling
--------------

[](#error-handling)

```
use LaravelShirtigo\Exceptions\ShirtigoException;

try {
    $orders = Shirtigo::orders()->getAll();
} catch (ShirtigoException $e) {
    // Handle API error
    echo 'Error: ' . $e->getMessage();
    echo 'Status Code: ' . $e->getStatusCode();
}
```

Logging
-------

[](#logging)

API calls are automatically logged (when enabled):

```
// In configuration
'logging' => [
    'enabled' => true,
    'channel' => 'default',
],
```

Testing
-------

[](#testing)

```
composer test
```

Configuration
-------------

[](#configuration-1)

The complete configuration can be found in the `config/shirtigo.php` file:

```
return [
    'api_key' => env('SHIRTIGO_API_KEY'),
    'base_url' => env('SHIRTIGO_BASE_URL', 'https://cockpit.shirtigo.com/api/'),

    'cache' => [
        'enabled' => env('SHIRTIGO_CACHE_ENABLED', true),
        'ttl' => env('SHIRTIGO_CACHE_TTL', 3600),
        'prefix' => 'shirtigo_',
    ],

    'retry' => [
        'attempts' => env('SHIRTIGO_RETRY_ATTEMPTS', 3),
        'delay' => env('SHIRTIGO_RETRY_DELAY', 1000),
    ],

    'timeout' => [
        'connect' => env('SHIRTIGO_CONNECT_TIMEOUT', 30),
        'read' => env('SHIRTIGO_READ_TIMEOUT', 60),
    ],

    'logging' => [
        'enabled' => env('SHIRTIGO_LOGGING_ENABLED', true),
        'channel' => env('SHIRTIGO_LOG_CHANNEL', 'default'),
    ],
];
```

License
-------

[](#license)

GPL-3.0

Author
------

[](#author)

**Benjamin Klein**
Email:

Support
-------

[](#support)

For questions or issues, please create an issue in the GitHub repository.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance66

Regular maintenance activity

Popularity3

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

2

Last Release

207d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/87cafd3ea44fc1562ead361cbd18e57324290cfeed8adf17eb9533665c6302c6?d=identicon)[webkult](/maintainers/webkult)

---

Top Contributors

[![Hackbard](https://avatars.githubusercontent.com/u/971231?v=4)](https://github.com/Hackbard "Hackbard (6 commits)")[![cursoragent](https://avatars.githubusercontent.com/u/199161495?v=4)](https://github.com/cursoragent "cursoragent (3 commits)")

###  Code Quality

TestsPest

Static AnalysisRector

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/laravel-shirtigo-wrapper/health.svg)

```
[![Health](https://phpackages.com/badges/laravel-shirtigo-wrapper/health.svg)](https://phpackages.com/packages/laravel-shirtigo-wrapper)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[echolabsdev/prism

A powerful Laravel package for integrating Large Language Models (LLMs) into your applications.

2.3k388.3k10](/packages/echolabsdev-prism)[sajya/server

Easy implementation of the JSON-RPC 2.0 server for the Laravel framework.

2391.9M4](/packages/sajya-server)[wotz/laravel-swagger-ui

Add Swagger UI to a Laravel application.

277321.8k](/packages/wotz-laravel-swagger-ui)[vemcogroup/laravel-weather

Weather package for Laravel to use different providers to get weather info

5525.0k](/packages/vemcogroup-laravel-weather)[yakovenko/laravel-lighthouse-graphql-multi-schema

A Laravel package that provides multi-schema support for Lighthouse GraphQL.

1562.5k](/packages/yakovenko-laravel-lighthouse-graphql-multi-schema)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
