PHPackages                             inquid/laravel-stock - 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. [Database &amp; ORM](/categories/database)
4. /
5. inquid/laravel-stock

ActiveLibrary[Database &amp; ORM](/categories/database)

inquid/laravel-stock
====================

Keep stock for Eloquent models

2.0.2(5mo ago)1235MITPHPPHP ^8.0

Since Mar 16Pushed 5mo agoCompare

[ Source](https://github.com/inquid/laravel-stock)[ Packagist](https://packagist.org/packages/inquid/laravel-stock)[ Docs](https://github.com/inquid/laravel-stock)[ Patreon](https://www.patreon.com/appstract)[ RSS](/packages/inquid-laravel-stock/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (11)Used By (0)

Laravel Stock
=============

[](#laravel-stock)

[![Latest Version on Packagist](https://camo.githubusercontent.com/64d9683e833e947c6abe870c9a1e583e007ffb5162d8a7abb25d78623f5421fd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696e717569642f6c61726176656c2d73746f636b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/appstract/laravel-stock)[![Total Downloads](https://camo.githubusercontent.com/58ab73e576a0fa05d2025e79e91ed187d934dd0c9d88f1e6c9dbcab6a1abba19/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696e717569642f6c61726176656c2d73746f636b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/appstract/laravel-stock)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

Keep stock for Eloquent models. This package will track stock mutations for your models. You can increase, decrease, clear and set stock. It's also possible to check if a model is in stock (on a certain date/time).

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

[](#installation)

You can install the package via composer:

```
composer require inquid/laravel-stock
```

By running `php artisan vendor:publish --provider="Inquid\Stock\StockServiceProvider"` in your project all files for this package will be published. Run `php artisan migrate` to migrate the table. There will now be a `stock_mutations` table in your database.

The configuration file looks this:

```
