Download the PHP package fabpl/laravel-stock without Composer
On this page you can find all versions of the php package fabpl/laravel-stock. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fabpl/laravel-stock
More information about fabpl/laravel-stock
Files in fabpl/laravel-stock
Package laravel-stock
Short Description Keep stock for Eloquent models.
License MIT
Homepage https://github.com/fabpl/laravel-stock
Informations about the package laravel-stock
Laravel Stock
Keep stock for Eloquent models. This package will track stock mutations for your models. You can increase, decrease stock.
Installation
You can install the package via composer:
You can publish and run the migrations with:
You can publish the config file with:
This is the contents of the published config file:
Preparing your model
To associate stock with a model, the model must implement the following interface and trait:
To increment stock, you can use the incrementStock
method:
To decrement stock, you can use the decrementStock
method:
If you want to use reference functionality, the model must implement the following interface and trait:
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-stock with dependencies
spatie/laravel-package-tools Version ^1.13.0
illuminate/contracts Version ^9.0