PHP code example of mvdnbrk / warehouse-framework
1. Go to this page and download the library: Download mvdnbrk/warehouse-framework library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mvdnbrk / warehouse-framework example snippets
$inventory = Inventory::first();
$inventory->move($location);
$location->moveMany([
'1234567890005',
'1234567890005',
], $location2);
$order = Order::create([
'order_number' => 'my-first-order-0001',
]);
$order->addLine('1300000000000');
$order->addLine('1234567890005', 2);
$order->addLine(...);
$order->process();
$order->hold();
$order->unhold();
$order->status->isCreated();
$order->status->isOpen();
$order->status->isBackorder();
$order->status->isHold();
$order->status->isFulfilled();
$order->status->isDeleted();
$order->hasPickList();
$order->pickList();
$order->pickList()->each(function ($item) {
$item->get('gtin');
$item->get('location');
$item->get('quantity');
});
$order->markAsFulfilled();
$order->lines->first()->replace();
Stock::available();
Stock::backorder();
Stock::reserved();
Stock::gtin('1300000000000')->available();
Stock::gtin('1300000000000')->backorder();
Stock::gtin('1300000000000')->reserved();
bash
php artisan warehouse:install
bash
php artisan warehouse:migrate
php
Location::all();
bash
php artisan warehouse:make:location
php
$location = Location::find(1);
$location->removeInventory('1234567890005');
php
$location = Location::find(1);
$location->removeAllInventory();