v1.0.2

Product Information Management

The central repository for all your product data. Handle SKU attributes, categories, and media with a flexible EAV model designed for high-volume catalogs.

Getting Started

Installation

$ composer require obelaw/ium-pim

Publish Configuration

$ php artisan vendor:publish --tag=ium-pim-config

Run Migrations

$ php artisan migrate

Requirements

  • • PHP 8.2+
  • • Laravel 10+
  • • MySQL 8.0+ or PostgreSQL 14+

Products

Products are the core entity in IUM-PIM. Each product is represented by a ProductDTO and stored using the flexible EAV (Entity-Attribute-Value) model.

Creating a Product

use Obelaw\Ium\Pim\Data\ProductDTO;
use Obelaw\Ium\Pim\Actions\CreateProduct;

// Create a new product
$product = CreateProduct::run(ProductDTO::from([
    'sku' => 'WIDGET-001',
    'name' => 'Super Widget',
    'status' => 'active',
]));

Updating a Product

use Obelaw\Ium\Pim\Actions\UpdateProduct;

UpdateProduct::run($product, ProductDTO::from([
    'name' => 'Super Widget Pro',
]));

Categories

Categories are organized as nested trees. Each category can have unlimited depth, and products can belong to multiple categories simultaneously.

Creating a Category Tree

use Obelaw\Ium\Pim\Actions\CreateCategory;

$root = CreateCategory::run(['name' => 'Electronics']);
$child = CreateCategory::run([
    'name' => 'Laptops',
    'parent_id' => $root->id,
]);

Attributes

The EAV model allows you to define custom attributes without schema changes. Attributes support multiple types: text, number, boolean, select, and multiselect.

Supported Types

  • text — String values
  • number — Integer / Float
  • boolean — True / False
  • select — Single choice
  • multiselect — Multiple choices

Features

  • • Scoped per attribute set
  • • Validation rules per attribute
  • • Searchable & filterable
  • • Multi-store value overrides
  • • Bulk import support

Media

Attach images, documents, and other files to products. Media is managed through a dedicated service that supports multiple storage drivers.

use Obelaw\Ium\Pim\Actions\AttachMedia;

AttachMedia::run($product, [
    'type' => 'image',
    'path' => 'products/widget-001.jpg',
    'label' => 'Main Image',
    'position' => 1,
]);