Inventory
Description
Inventory manages Enso warehouses, storage positions, labels, stock reservations, and availability calculations.
The package exposes CRUD flows for warehouses and positions, position move and product-location endpoints, label indexes and options, and a server-side inventory service that handles insert, move, reserve, fulfill, swap, cancel, and stock-update operations.
It is intended for private Enso deployments that need warehouse and stock-control workflows tied to commercial documents.
Installation
This is a proprietary package distributed through the private Enso registry.
Run the package migrations:
php artisan migrate
Optional publishes:
php artisan vendor:publish --tag=inventory-factories
php artisan vendor:publish --tag=inventory-import-template
Features
- Warehouse CRUD, table, export, and options endpoints.
- Position CRUD, table, export, product lookup, and stock-move endpoints.
- Label index and options endpoints.
- Import template for warehouse position onboarding.
- Inventory service methods for insert, undo insert, move, fulfill, undo fulfill, reserve, swap, cancel, and stock refresh operations.
Usage
The package mounts its routes under:
inventory.warehouses.*inventory.positions.*inventory.labels.*
Use the service for stock operations:
use LaravelEnso\Inventory\Services\Inventory;
Inventory::reserve($orderLine, 5);
Inventory::move($product, $fromPosition, $toPosition, 2);
API
HTTP routes
Warehouses:
GET api/inventory/warehouses/createPOST api/inventory/warehousesGET api/inventory/warehouses/{warehouse}/editPATCH api/inventory/warehouses/{warehouse}DELETE api/inventory/warehouses/{warehouse}GET api/inventory/warehouses/initTableGET api/inventory/warehouses/tableDataGET api/inventory/warehouses/exportExcelGET api/inventory/warehouses/options
Positions:
GET api/inventory/positions/createPOST api/inventory/positionsGET api/inventory/positions/{position}/editPATCH api/inventory/positions/{position}DELETE api/inventory/positions/{position}GET api/inventory/positions/initTableGET api/inventory/positions/tableDataGET api/inventory/positions/exportExcelGET api/inventory/positions/showGET api/inventory/positions/{product}/{warehouse?}POST api/inventory/positions/move/{product}/{from}/{to}
Labels:
GET api/inventory/labelsGET api/inventory/labels/options
Service surface
Inventory::insert()Inventory::undoInsert()Inventory::move()Inventory::fulfill()Inventory::undoFulfill()Inventory::reserve()Inventory::swapReservations()Inventory::cancelReservation()Inventory::supplementInReservations()Inventory::supplementProductReservations()Inventory::available()Inventory::reservedQuantity()Inventory::locations()Inventory::positionsQuantity()Inventory::remainingQuantity()Inventory::updateStock()
Depends On
Required Enso packages:
laravel-enso/addresses↗laravel-enso/commercial↗laravel-enso/core↗laravel-enso/data-import↗laravel-enso/dynamic-methods↗laravel-enso/forms↗laravel-enso/helpers↗laravel-enso/migrator↗laravel-enso/product-lots↗laravel-enso/products↗laravel-enso/select↗laravel-enso/tables↗laravel-enso/track-who↗
Companion frontend package: