Get in touch
An idea, a challenge or a slow webshop? Drop us a line.
Contact details
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; 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: from source to shop, no middlemen $catalog = $this->pim->pull($project) |> $this->erp->enrichWithStockAndPrices(...) |> $this->crm->attachSegments(...); return new Deliverable( catalog: $catalog, speed: $this->clock->stop(), // we actually make it fast middlemen: 0, ); } }
$ php artisan ten50:ship --project=webshop
[PIM] akeneo → 12,840 products enriched 12ms
[ERP] sap → stock + prices live 34ms
[CRM] hubspot → segments attached 9ms
✓ 0 middlemen ✓ 0 project managers
Shipped in 1050ms
⎇ ship/1050✓ 0 problems+3 −0PHP 8.5 · Laravel · ten500 middlemen