ameringkseh / stock-management
A robust Stock Management module for Laravel applications.
Requires
- php: ^8.2
- illuminate/support: ^10.0|^11.0|^12.0
Requires (Dev)
- orchestra/testbench: ^8.0|^9.0
- phpunit/phpunit: ^10.0
README
A simple and robust stock/inventory management module for Laravel applications. Provides a ready-to-use UI for managing product stock levels.
Features
- 📦 View all products sorted by stock level
- ✏️ Update stock quantities with validation
- 🗑️ Delete products (with image cleanup)
- ⚙️ Configurable model — use any Eloquent model
- 🎨 Pre-built Blade views
Requirements
- PHP ^8.2
- Laravel ^10.0 | ^11.0 | ^12.0
Installation
Install the package via Composer:
composer require ameringkseh/stock-management
Laravel will automatically discover the service provider.
Configuration
Publish the configuration file:
php artisan vendor:publish --tag=stock-management-config
This will create config/stock-management.php where you can specify the Eloquent model to use:
return [ 'model' => 'App\\Models\\Menu', ];
The model must have a stok (integer) attribute. Optionally, it can have a gambar (string) attribute for image management.
Usage
The package automatically registers the following routes (under web and auth middleware):
| Method | URI | Action |
|---|---|---|
| GET | /stok-management |
View stock list |
| POST | /stok-management/update |
Update stock |
| DELETE | /stok-management/{id} |
Delete product |
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
License
The MIT License (MIT). Please see License File for more information.