Laravel EnsoLaravel Enso
Guide
Back End
Front End
GitHub
Guide
Back End
Front End
GitHub
  • Back End

    • Action Logger
    • Addresses
    • Algolia
    • Algolia Webshop
    • API
    • Audits
    • Avatars
    • Cache Chain
    • Calendar
    • Cargo Partner
    • Categories
    • Charts
    • CI/CD
    • Cli
    • CNP Validator
    • Comments
    • Commercial
    • Companies
    • Core
    • Countries
    • Currencies
    • Data Export
    • Data Import
    • Discounts
    • Documents
    • Dynamic Methods
    • EAV
    • Emag
    • Enums
    • Excel
    • Facebook
    • Files
    • Filters
    • Financials
    • Forms
    • Frisbo
    • Google
    • Helpers
    • Holidays
    • How-to
    • Image Transformer
    • Impersonate
    • Interactions
    • Inventory
    • IO
    • Localisation
    • Lockable Models
    • Logs
    • Measurement Units
    • Meili Search
    • Meili Search Webshop
    • Menus
    • Migrator
    • Monitored Emails
    • Notifications
    • Packaging Units
    • PDF
    • People
    • Permissions
    • Product Eav
    • Product Lots
    • Products
    • Questionnaires
    • Rememberable
    • Roles
    • Sale Channels
    • Searchable
    • Select
    • Sentry
    • Services
    • Smart Bill
    • Sms Advert
    • Stripe
    • Tables
    • Tasks
    • Teams
    • Ticketing
    • Track Who
    • Tutorials
    • Typesense
    • Typesense Webshop
    • Unit Conversion
    • Upgrade
    • UPS
    • User Groups
    • Users
    • Versions
    • Virtual Call Center
    • Vouchers
    • Webshop
    • Webshop Commercial

Product Lots

LicenseStablePHPIssuesMerge Requests

Description

Product Lots adds batch and expiry tracking for products in Laravel Enso.

The package exposes a standard CRUD and table API for product lots and provides the lot model used by inventory flows to compute remaining stock per lot.

It is intended for inventory-driven applications that need traceable purchase lots, expiry-based filtering, and available quantity computation.

Installation

Install the package:

composer require laravel-enso/product-lots

Run the package migrations:

php artisan migrate

Features

  • Product lot CRUD, table init, table data, and Excel export endpoints.
  • Lot model with product() and inventoryIns() relations.
  • Computed availableQuantity accessor based on remaining inbound inventory.
  • Date scopes for expiresAfter() and expiresBefore().
  • Rememberable cache keys for lot id and code.

Usage

Main route group:

  • administration.productLots.*

Lots are linked to products and are later consumed by inventory flows that record inbound quantities against a given lot.

Useful model helpers:

$lot->availableQuantity();
Lot::query()->expiresBefore(now()->addMonth());

API

HTTP routes

  • GET api/administration/productLots
  • GET api/administration/productLots/create
  • POST api/administration/productLots
  • GET api/administration/productLots/{lot}/edit
  • PATCH api/administration/productLots/{lot}
  • DELETE api/administration/productLots/{lot}
  • GET api/administration/productLots/initTable
  • GET api/administration/productLots/tableData
  • GET api/administration/productLots/exportExcel

Depends On

Required Enso packages:

  • laravel-enso/core ↗
  • laravel-enso/dynamic-methods ↗
  • laravel-enso/products ↗

Companion frontend package:

  • @enso-ui/product-lots ↗
Edit this page on GitHub
Last Updated: 4/20/2026, 6:08:23 PM
Prev
Product Eav
Next
Products