Neem contact op
Een idee, een uitdaging of een trage webshop? Laat van je horen.
Contactgegevens
Ten50Service.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php namespace App\Services; use App\Integrations\{Pim, Erp, Crm}; use App\Support\Stopwatch; final class Ten50Service { private const PRICE = 10.50; // tientje vieftig public function __construct( private readonly Pim $pim, private readonly Erp $erp, private readonly Crm $crm, private readonly Stopwatch $clock, ) {} public function ship(Project $project): Deliverable { $this->clock->start(); // PHP 8.5 pipe: van bron naar shop, geen tussenlagen $catalog = $this->pim->pull($project) |> $this->erp->enrichWithStockAndPrices(...) |> $this->crm->attachSegments(...); return new Deliverable( catalog: $catalog, speed: $this->clock->stop(), // wij maken het wel snel middlemen: 0, ); } }
$ php artisan ten50:ship --project=webshop
[PIM] akeneo → 12.840 producten verrijkt 12ms
[ERP] sap → voorraad + prijzen live 34ms
[CRM] hubspot → segmenten gekoppeld 9ms
✓ 0 tussenlagen ✓ 0 projectmanagers
Shipped in 1050ms
⎇ ship/1050✓ 0 problems+3 −0PHP 8.5 · Laravel · ten500 tussenlagen