PHP code example of azaharizaman / nexus-manufacturing-operations
1. Go to this page and download the library: Download azaharizaman/nexus-manufacturing-operations 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/ */
azaharizaman / nexus-manufacturing-operations example snippets
use Nexus\ManufacturingOperations\Services\ManufacturingOrchestrator;
use Nexus\ManufacturingOperations\DTOs\ProductionOrderRequest;
// 1. Plan Production
$request = new ProductionOrderRequest(
productId: 'P-100',
quantity: 50.0,
dueDate: new \DateTimeImmutable('+2 weeks')
);
$order = $orchestrator->planProduction($tenantId, $request);
// 2. Release Order (Reserves Stock)
$releasedOrder = $orchestrator->releaseOrder($tenantId, $order->id);
// 3. Complete Order (Check Quality, Issue Stock, Receive Goods)
$completedOrder = $orchestrator->completeOrder($tenantId, $releasedOrder->id);