This repository was archived by the owner on Oct 17, 2025. It is now read-only.
Releases: Caryley/Laravel-Inventory
Releases · Caryley/Laravel-Inventory
v3.0.0
New Functionality
- Increment inventory
$model-> incrementInventory(10); // Will increment inventory by 10.- DecrementInventory inventory
$model->decrementInventory(5); // Will subtract 5 from current inventory.
$model->decrementInventory(-5); // Will subtract 5 from current inventory.Updated
- Improved overall package performance, preventing eager loading when manipulating the inventory
- Laravel 10 support
- Migrate to Pest
- Added incrementInventory()
- Added decrementInventory()
Deprecated
- Dropped Laravel 8 support
v2.0.0
Updated
- Minimum require PHP 8.* & Laravel ^8.71
- Support Laravel 9
Deprecated
- None
v1.1.0
New Functionality
- Check if a model has a valid inventory
$model->hasValidInventory(); // Return booleanUpdated
- Merged "Fixed Warning on inInventory()" (#6)
- For a creation of an inventory use
setInventory()and avoid usingcreateInventory()||createInventory()is now aprotectedmethod and never meant to be part of the public API.
Deprecated
- None
v1.0.0
v0.1.0
New Functionality
- Add to a nonexisting inventory
$model->addInventory(1, 'New Inventory'); // (on an empty inventory model, the package will create a new inventory with the given quantity.)Updated
- Added documentation to all methods.
Deprecated
- None
Hello World!
The Laravel Inventory package helps track an inventory on any laravel model.
The package offers the following function:
- Set a new inventory
- Return the current inventory
- Add to an inventory
- Subtract from an inventory
- Clear an inventory
- Return boolean if the model is in inventory
- Return boolean if the model is not in inventory
- Scopes