23 lines
512 B
PHP
23 lines
512 B
PHP
<?php
|
|
|
|
/**
|
|
* @package: patterns
|
|
* @author: Yevhen Odynets
|
|
* @date: 2025-07-07
|
|
* @time: 00:04
|
|
*/
|
|
|
|
declare(strict_types = 1);
|
|
|
|
use Carbon\Carbon;
|
|
use Pattern\SOLID\SingleResponsibility\HtmlOutput;
|
|
use Pattern\SOLID\SingleResponsibility\SalesReporter;
|
|
use Pattern\SOLID\SingleResponsibility\SalesRepository;
|
|
|
|
$now = Carbon::now();
|
|
$report = new SalesReporter(new SalesRepository);
|
|
|
|
$output = $report->between($now->clone()->subDays(10)->format('Y-m-d'), $now->format('Y-m-d'), new HtmlOutput);
|
|
|
|
echo($output);
|