Download the PHP package aliziodev/laravel-product-catalog without Composer

On this page you can find all versions of the php package aliziodev/laravel-product-catalog. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-product-catalog

Laravel Product Catalog

codecov Tests Latest Version on Packagist
Total Downloads PHP Version Laravel Version Ask DeepWiki

A professional, variant-centric product catalog package for Laravel 12+. Designed to be a stable foundation for any application that needs structured product data — from a simple internal catalog to a full ecommerce storefront — without locking you into a specific architecture.


Table of Contents


Suitable For

Use Case Description
Product Catalog Display products with filtering, search, and SEO-friendly slug routing
Online Store Storefront with prices, discount badges, per-variant stock, and cart-ready data
Simple Ecommerce Order integration with reserve/release stock and an audit trail of stock movements
Internal Catalog Internal product database with product codes, cost prices, and custom metadata
Digital & Physical Mixed catalog — physical variants (tracked stock) and digital (unlimited) in one product
Custom Inventory Stock already managed externally (ERP, WMS, your own table) — connect it via a single interface

Features

Catalog

Variants & Options

Inventory

Extensibility


Why This Package

Most ecommerce packages bundle payment, cart, and order management alongside the catalog. This package does one thing well: product catalog with variant-centric inventory. You own the order flow.


Requirements


Quick Start

Installation

Publish and run the migrations:

Optionally publish the config:

Or run the interactive installer:


Configuration


Basic Usage

Products

Variants & Options

Inventory

Reservation Lifecycle

Use the inventory driver for reserve/release/commit — these methods record movements and fire events.

InventoryReason

Use InventoryReason constants to keep reason strings consistent across your application.

Add your own reason strings to config/product-catalog.php:

Taxonomy

Querying


Product Specifications

Both Product and ProductVariant have a meta JSON column for storing arbitrary key-value data — including product specifications.

Why there is no dedicated product_attributes table in this package

A filterable attribute system is a common need — but not a universal one:

Domain Typical attributes
Fashion Material, Fit, Care instructions
Electronics Wattage, Resolution, Storage capacity
Books Genre, Language, Page count
Internal catalog May not need spec filtering at all

Because attribute schemas differ across domains, a single built-in implementation would either be too opinionated (forcing a schema that doesn't fit your domain) or too generic (adding migration weight for every consumer, even those that don't need it). The meta JSON column is the right default for specs that are display-only.

When to add filterable attributes at the application level

If your application needs to filter or search products by specification value, add a product_attributes table in your own migration:

Extend the Product model in your application:

Filter by attribute:

This keeps the package lean and gives your application full control over the attribute schema, indexing strategy, and query patterns.


Search

The default driver is database (Eloquent LIKE, no extra dependencies). Switch to scout driver for Meilisearch, Algolia, or Typesense — see docs/scout-integration.md.

When using scout, set the top-level model key to your application Product model that extends the package base model and uses both Laravel\Scout\Searchable and Aliziodev\ProductCatalog\Concerns\Searchable. This same key is read by the database search driver and the API controller — configure your extended model once, everywhere.


Slug Routing

Slugs use a permanent random route_key suffix (Shopee-style). Renaming a product regenerates the slug prefix but keeps the same route key, so old URLs still resolve.

Enable the built-in read-only API routes:


API Resources

Response shape:


Events

Event Fired when
ProductPublished $product->publish()
ProductArchived $product->archive()
InventoryAdjusted adjust(), set(), or commit() changes total quantity
InventoryReserved reserve() or release() changes reserved_quantity

Inventory Policies

Set per InventoryItem via policy column:

Policy Behaviour
track Checks actual quantity; denies when quantity <= reserved_quantity
allow Always in stock — overselling permitted (digital goods, pre-order)
deny Always out of stock — variant is unavailable

Spatie Media Library Integration

This package intentionally excludes a built-in image gallery to stay compatible with any media solution your application already uses.

Install spatie/laravel-medialibrary:

Extend the Product model in your application:

Important: Laravel's service container bind() does not affect Eloquent relationships. The package's $variant->product() is hardcoded to BaseProduct::class and will still return the base model. Choose one of the two approaches below.

Approach A — Simple (recommended for most projects)

Use App\Models\Product in all your app code. When you get a product through a variant relationship and need media, re-query with your model:

Approach B — Override the relationship (complete solution)

Also extend ProductVariant to return your Product:

Then use App\Models\ProductVariant everywhere in your app code.

Upload and retrieve:


Custom Inventory Driver

If your application already has its own stock system — your own inventories table, an ERP, or a third-party WMS — you don't have to use the package's catalog_inventory_items table. Implement InventoryProviderInterface and the package will talk to your system instead.

Register the driver in a ServiceProvider:

Activate via .env:

For more examples (ERP/WMS API, fallback strategy) see docs/custom-inventory-provider.md.


Testing

When writing tests for code that uses this package, set up your test case with migrations and factories:

For tests that need the inventory facade, swap to the null driver so no DB records are required:

To override the inventory driver in a specific test:


Use-Case Docs

Detailed guides for specific scenarios:

Guide Description
Product Catalog Read-only catalog with filtering, search, and slug routing
Online Store Storefront with price display, stock badges, and cart-ready data
Simple Ecommerce Minimal ecommerce setup with order integration
Internal Catalog B2B / internal product database with cost price and meta fields
Digital & Physical Products Mixed catalog with unlimited-stock and downloadable variants
Custom Inventory Provider Connect ERP, WMS, Redis, or any external stock source
Scout Integration Full-text search with Algolia, Meilisearch, or Typesense via Laravel Scout
Configuration Reference Deep dive into every config key with pitfalls and gotchas

License

MIT — see LICENSE.


All versions of laravel-product-catalog with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/support Version ^12.0|^13.0
illuminate/database Version ^12.0|^13.0
illuminate/events Version ^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package aliziodev/laravel-product-catalog contains the following files

Loading the files please wait ...