PHPackages                             visanduma/laravel-inventory - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. visanduma/laravel-inventory

ActiveLibrary

visanduma/laravel-inventory
===========================

This is my package laravel-inventory

01[1 PRs](https://github.com/Visanduma/laravel-inventory/pulls)PHPCI failing

Since Mar 27Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Visanduma/laravel-inventory)[ Packagist](https://packagist.org/packages/visanduma/laravel-inventory)[ RSS](/packages/visanduma-laravel-inventory/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

Laravel Inventory
=================

[](#laravel-inventory)

🚧 UNDER DEVELOPMENT 🚧
---------------------

[](#-under-development-)

[![Latest Version on Packagist](https://camo.githubusercontent.com/5b4fa2a7ac79856db570fac0ec3ea0d6cf5ce6b47f8b85c7b846309268105eb6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f766973616e64756d612f6c61726176656c2d696e76656e746f72792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/visanduma/laravel-inventory)[![GitHub Tests Action Status](https://camo.githubusercontent.com/84bc64b1936c72f6eb7b74c9e82ee666e43f45a1bf189f39424e2b2cae781a0b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f766973616e64756d612f6c61726176656c2d696e76656e746f72792f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/visanduma/laravel-inventory/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/892ca33e1bf6fc0fac7851b395f7e00d4053294072ed15c7da82877636e90702/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f766973616e64756d612f6c61726176656c2d696e76656e746f72792f466978253230504850253230636f64652532307374796c652532306973737565733f6c6162656c3d636f64652532307374796c65)](https://github.com/visanduma/laravel-inventory/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/ccfaee84133df99e84fe67684afda0617a7cca4d0194f907e6c4d9dadac49d77/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f766973616e64756d612f6c61726176656c2d696e76656e746f72792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/visanduma/laravel-inventory)

Simple &amp; reliable inventory management package for Laravel

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require visanduma/laravel-inventory
```

You can publish and run the migrations with:

```
php artisan vendor:publish --tag="inventory-migrations"
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --tag="inventory-config"
```

This is the contents of the published config file:

```
return [
	 'table_name_prefix' => 'la'
];
```

Usage
-----

[](#usage)

### Stock Management

[](#stock-management)

#### Reducing Stock

[](#reducing-stock)

You can reduce stock in several ways:

1. Using the Stock model directly:

```
// Get a stock instance
$stock = $productVariant->stock();

// Reduce stock by 10 units
$stock->reduce(10, 'Order #123');
```

2. Using the ProductVariant model:

```
// Reduce stock by 5 units from the default batch
$productVariant->reduce(5, 'Order #123');

// Reduce stock from a specific batch
$productVariant->reduce(5, 'Order #123', 'batch-name');
```

3. Using the LaravelInventory facade:

```
use Visanduma\LaravelInventory\Facades\LaravelInventory;

// Reduce stock for a product variant
LaravelInventory::reduceStock($productVariant, 10, 'Order #123');

// Reduce stock from a specific batch
LaravelInventory::reduceStock($productVariant, 10, 'Order #123', 'batch-name');
```

Each method creates a stock movement record and updates the stock quantity.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/Visanduma/.github/blob/main/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Visanduma](https://github.com/Visanduma)
- [LaHiRu](https://github.com/lahirulhr)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity27

Early-stage or recently created project

 Bus Factor1

Top contributor holds 88.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/30f6d3c78c26dd226777b19b659363509fe92a95a682fbfcba13eda64060b591?d=identicon)[dumithrathnayaka](/maintainers/dumithrathnayaka)

---

Top Contributors

[![lahirulhr](https://avatars.githubusercontent.com/u/13136764?v=4)](https://github.com/lahirulhr "lahirulhr (55 commits)")[![dhanuSama](https://avatars.githubusercontent.com/u/83012567?v=4)](https://github.com/dhanuSama "dhanuSama (3 commits)")[![dumithsalinda](https://avatars.githubusercontent.com/u/1443237?v=4)](https://github.com/dumithsalinda "dumithsalinda (3 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

### Embed Badge

![Health badge](/badges/visanduma-laravel-inventory/health.svg)

```
[![Health](https://phpackages.com/badges/visanduma-laravel-inventory/health.svg)](https://phpackages.com/packages/visanduma-laravel-inventory)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
