Products
Description
Products provides the base catalog, media, documents, supplier links, and bundle support used by commercial and inventory modules in Laravel Enso.
The package exposes CRUD and table APIs for products, nested APIs for pictures and documents, searchable registration, and a scheduled command that recalculates bundle prices overnight.
It is the core private catalog package on which product EAV, inventory, webshop, discounts, and related commercial flows build.
Installation
Install the package:
composer require laravel-enso/products
Run the package migrations:
php artisan migrate
Optional publishes:
php artisan vendor:publish --tag=products-config
php artisan vendor:publish --tag=products-factories
php artisan vendor:publish --tag=products-assets
Features
- Product CRUD, options, supplier options, bundleable options, and Excel export endpoints.
- Nested picture and document upload APIs with reorder support.
- Form template with tabs for general data, category, suppliers, pictures, bundle composition, and rich descriptions.
- Searchable registration for
name,internal_code, andpart_number. - Scheduled
enso:products:update-bundle-pricescommand executed daily at01:25. - Morph map registration for the
Productmodel.
Usage
Main route groups:
products.*products.pictures.*products.documents.*
The core product form template includes:
- general catalog fields
- supplier selection and default supplier
- bundle configuration
- gallery and document tabs
- category slot integration
Bundle prices are recalculated automatically by the scheduler, or manually:
php artisan enso:products:update-bundle-prices
API
HTTP routes
GET api/products/createPOST api/productsGET api/products/{product}/editPATCH api/products/{product}DELETE api/products/{product}GET api/products/initTableGET api/products/tableDataGET api/products/exportExcelGET api/products/optionsGET api/products/suppliersGET api/products/bundleablesGET api/products/pictures/{product}POST api/products/pictures/{product}DELETE api/products/pictures/{picture}PATCH api/products/pictures/{picture}/reorderGET api/products/documents/{product}POST api/products/documents/{product}DELETE api/products/documents/{productDocument}PATCH api/products/documents/{productDocument}/reorder
Artisan commands
enso:products:update-bundle-prices
Search registration
- group:
Product - attributes:
name,internal_code,part_number - permission group:
products
Depends On
Required Enso packages:
laravel-enso/categories↗laravel-enso/comments↗laravel-enso/core↗laravel-enso/data-import↗laravel-enso/documents↗laravel-enso/dynamic-methods↗laravel-enso/enums↗laravel-enso/forms↗laravel-enso/helpers↗laravel-enso/measurement-units↗laravel-enso/migrator↗laravel-enso/packaging-units↗laravel-enso/tables↗
Companion frontend package: