feat(dashboard): add price history, caching, and i18n

This commit is contained in:
2026-08-01 21:21:43 +02:00
parent 1cd905ca4a
commit 7fb49131c4
22 changed files with 177 additions and 30 deletions
@@ -5,6 +5,7 @@ namespace App\Features\Dashboard\Clients;
use App\Features\Dashboard\Contracts\PriceClient;
use Exception;
use Illuminate\Http\Client\Factory;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
use Throwable;
@@ -14,14 +15,14 @@ class ZonneplanPriceClient implements PriceClient
private readonly Factory $http,
) {}
public function getElectricityPrices(): array
public function getElectricityPrices(): Collection
{
return $this->get('/energy-prices/electricity/upcoming');
return collect($this->get('/energy-prices/electricity/upcoming'));
}
public function getGasPrices(): array
public function getGasPrices(): Collection
{
return $this->get('/energy-prices/gas/upcoming');
return collect($this->get('/energy-prices/gas/upcoming'));
}
/** @return array<int, array<string, mixed>> */