Laravel Stock Tracking Package

Laravel Stock is an inventory tracking package that tracks inventory numbers in models.

for example Book you may need to keep track of the stock of the model and HasStock You can start your inventory tracking by adding .

use Appstract\Stock\HasStock;
class Book extends Model
use HasStock;

When a customer orders for a book, you can change the number of stocks as follows:

Change stock positively or negatively with one method

Then you can check if a product is in stock in your user interface:

See if you have at least 10 of the same book in stock

Finally, you can clear stocks:

Clear stock and then set a new value
$book->clearStock (10);

To learn more about this package and get full installation instructions, you can view the source code on GitHub at appstract /laravel-stock 


KARABAY A, 2021 . Laravel Stock Tracking Package,

(Accessed February 22, 2021).

  Share this post

Comments (0)


Sign up for the email newsletter to be the first to know about my blog posts