21 lines
431 B
PHP
21 lines
431 B
PHP
<?php
|
|
|
|
namespace App\Features\Dashboard\Services;
|
|
|
|
use App\Features\Dashboard\Contracts\PriceRepository;
|
|
|
|
class DashboardService
|
|
{
|
|
public function __construct(
|
|
public PriceRepository $repository
|
|
) {}
|
|
|
|
public function getDashboardData(): array
|
|
{
|
|
return [
|
|
'electricity' => $this->repository->retrieveElectricity(),
|
|
'gas' => $this->repository->retrieveGas(),
|
|
];
|
|
}
|
|
}
|