azaharizaman/nexus-laravel-sales

Laravel adapter for Sales package with cross-package integrations

Maintainers

Package info

github.com/azaharizaman/nexus-laravel-sales

pkg:composer/azaharizaman/nexus-laravel-sales

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.0-alpha1 2026-05-05 02:28 UTC

This package is auto-updated.

Last update: 2026-05-05 03:42:43 UTC


README

This adapter provides Laravel-specific implementations for the Sales package, enabling integration with other Nexus packages.

Purpose

The Sales package is an atomic package that must remain independently publishable. This adapter layer provides the concrete implementations that integrate Sales with other packages like:

  • Nexus\Receivable - For credit limit checking and invoice generation
  • Nexus\Inventory - For stock reservation and availability checking

Installation

composer require azaharizaman/nexus-laravel-sales

Adapters Provided

ReceivableCreditLimitCheckerAdapter

Implements Nexus\Sales\Contracts\CreditLimitCheckerInterface by delegating to Nexus\Receivable\Contracts\CreditLimitCheckerInterface.

InventoryStockReservationAdapter

Implements Nexus\Sales\Contracts\StockReservationInterface by delegating to Nexus\Inventory\Contracts\ReservationManagerInterface.

ReceivableInvoiceManagerAdapter

Implements Nexus\Sales\Contracts\InvoiceManagerInterface by delegating to Nexus\Receivable\Contracts\ReceivableManagerInterface.

Service Provider

The SalesAdapterServiceProvider automatically binds the Sales interfaces to their adapter implementations when all required packages are available.

Architecture

This follows the Nexus Three-Layer Architecture:

  1. Atomic Layer (packages/Sales) - Pure business logic, no external dependencies
  2. Adapter Layer (adapters/Laravel/Sales) - Framework-specific implementations
  3. Application Layer - Uses adapters through interfaces

Dependencies

  • azaharizaman/nexus-sales - The atomic Sales package
  • azaharizaman/nexus-receivable - For credit checking and invoice generation
  • azaharizaman/nexus-inventory - For stock reservation
  • illuminate/support - Laravel framework components
  • illuminate/database - Laravel database components